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 git/
build/ dist/

View File

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