-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathupdate.sh
executable file
·38 lines (30 loc) · 970 Bytes
/
update.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
#ensure that we are in the script directory
pushd $(dirname "${BASH_SOURCE[0]}")
. ./bash/numcpus.sh
echo "-------------------------"
echo "---===================---"
echo "---=== QPX UPDATER ===---"
echo "---===================---"
echo "-------------------------"
echo " "
echo "This script will update qpx from latest git version. It will also"
echo "rerun the configure script. It will also copy (and replace) any"
echo "config and sample data files in your HOME/qpx directory. If you"
echo "have uncommitted changes, then maybe you shouldn't do this."
echo " "
read -r -p "Update and build qpx now? [Y/n]" mkrelease
mkrelease=${mkrelease,,} # tolower
if [[ $mkrelease =~ ^(yes|y| ) ]]; then
git pull
git submodule update
./bash/config.sh
SOURCEDIR=./data/*
DESTDIR=$HOME/qpx
mkdir -p $DESTDIR
cp -ur $SOURCEDIR $DESTDIR
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ../src || exit 1
make -j$NUMCPUS || exit 1
fi