bitwarden_rs-debian/build.sh

23 lines
444 B
Bash
Raw Normal View History

2019-03-26 18:22:31 +01:00
#!/usr/bin/env bash
set -e
2019-03-26 18:37:12 +01:00
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
SRC="$DIR/git"
DST="$DIR/dist"
if [ -d "$SRC" ]; then
cd "$SRC" || exit
2019-03-26 18:22:31 +01:00
git pull
cd - || exit
else
2019-03-26 18:37:12 +01:00
git clone https://github.com/dani-garcia/bitwarden_rs.git "$SRC"
2019-03-26 18:22:31 +01:00
fi
2019-03-26 18:37:12 +01:00
mkdir -p "$DST"
docker build -t bitwarden-deb "$DIR"
2019-03-26 18:22:31 +01:00
CID=$(docker run -d bitwarden-deb)
2019-03-26 18:37:12 +01:00
docker cp "$CID":/bitwarden_package/bitwarden-rs.deb "$DST"
2019-03-26 18:22:31 +01:00
docker rm "$CID"