dotfiles/bin/qst_up

28 lines
504 B
Plaintext
Raw Normal View History

2020-06-16 00:35:28 +02:00
#!/bin/bash
BUILDDIR="/tmp/makepkg/QSyncthingTray/cmake-build"
src="$HOME/utils/QSyncthingTray"
echo "** QSyncthingTray updater **"
cd $src
git fetch --all
mkdir -pv $BUILDDIR
cd $BUILDDIR
if [ $(pgrep '[Q]Sync') ]; then
echo "[*] killing QSyncthingTray..."
pkill -9 QSyncthingTray
fi
cmake -S$src ..
cmake --build . -- -j $(nproc)
cd $src
mv -vf $BUILDDIR/QSyncthingTray ~/.local/bin
rm -rf $BUILDDIR
echo "[*] starting QSyncthingTray..."
QSyncthingTray & > /dev/null 2>&1
git clean -fd --quiet