forked from LiskArchive/lisk-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclean.sh
37 lines (28 loc) · 825 Bytes
/
clean.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
#!/bin/bash
cd "$(cd -P -- "$(dirname -- "$0")" && pwd -P)" || exit 2
# shellcheck source=./shared.sh
. "$(pwd)/shared.sh"
# shellcheck source=./config.sh
. "$(pwd)/config.sh"
# shellcheck disable=SC2034
# Ignoring the failure due to shell indirection
CMDS=("autoconf" "automake" "make");
check_cmds CMDS[@]
echo "Cleaning up..."
echo "--------------------------------------------------------------------------"
cd release || exit 2
exec_cmd "rm -vrf lisk-*"
cd ../ || exit 2
mkdir -p src
cd src || exit 2
exec_cmd "rm -vrf $VERSION.*"
exec_cmd "rm -vrf lisk-$VERSION-*"
if [ "$1" = "all" ]; then
exec_cmd "rm -vrf $SODIUM_DIR"
exec_cmd "rm -vrf $NODE_SODIUM_DIR"
exec_cmd "rm -vrf $POSTGRESQL_DIR"
exec_cmd "rm -vrf $LISK_NODE_DIR"
exec_cmd "rm -vrf $NODE_DIR"
exec_cmd "rm -vrf *.tar.gz"
fi
cd ../ || exit 2