Rename build dir to dist

This commit is contained in:
Greizgh 2019-03-26 18:37:12 +01:00
parent 26f6915270
commit 073fe82176
2 changed files with 14 additions and 8 deletions

4
.gitignore vendored
View File

@ -1,2 +1,2 @@
git
build/
git/
dist/

View File

@ -2,15 +2,21 @@
set -e
if [ -d "$1/git" ]; then
cd "$1/git" || exit
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
SRC="$DIR/git"
DST="$DIR/dist"
if [ -d "$SRC" ]; then
cd "$SRC" || exit
git pull
cd - || exit
else
git clone https://github.com/dani-garcia/bitwarden_rs.git "$1/git"
git clone https://github.com/dani-garcia/bitwarden_rs.git "$SRC"
fi
docker build -t bitwarden-deb "$1"
mkdir -p "$DST"
docker build -t bitwarden-deb "$DIR"
CID=$(docker run -d bitwarden-deb)
mkdir -p "$1/build"
docker cp "$CID":/bitwarden_package/bitwarden-rs.deb "$1/build"
docker cp "$CID":/bitwarden_package/bitwarden-rs.deb "$DST"
docker rm "$CID"