forked from GenPi64/Build.Dist
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·36 lines (26 loc) · 702 Bytes
/
build.sh
File metadata and controls
executable file
·36 lines (26 loc) · 702 Bytes
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
#!/bin/bash
if [[ ! "$UID" == "0" ]]; then
echo "Build must run as root!"
exit 1
fi
cd "$(dirname $0)"
source scripts/functions.sh
export BASEDIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";
source ${BASEDIR}/env.sh
if [[ ! -d "$PROJECT_DIR" ]]; then
if [[ ! -e "$PROJECT_DIR" ]]; then
if [ ! -z $BTRFS_SNAPSHOTS ]; then
btrfs subvolume create "$PROJECT_DIR"
fi
fi
fi
if [ ! -z $BTRFS_SNAPSHOTS ] ; then
ckmkdir $BTRFS_SNAPSHOTS
fi
ckmkdir "$PROJECT_DIR"
if test -f "${PROJECT}.json"; then
$PARSERS/includejson/includejson ${PROJECT}.json
echo "run complete."
else
"No ${PROJECT}.json found. Try again."
fi