forked from t0pd4wn/loco.sh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathloco
executable file
·25 lines (22 loc) · 892 Bytes
/
loco
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
#!/bin/bash
#-------------------------------------------------------------------------------
# loco | loco user interface
#-------------------------------------------------------------------------------
LOCO_DEV="false"
# source needed modules
source ./src/code/modules/core/base.sh
source ./src/code/modules/loco_checks.sh
# check operating system
loco::check_operating_system
# launch the main.sh script and the finish.sh one
# needed to execute `main.sh` as root, and `finish.sh` as $USER, and then close terminal
if [[ "${LOCO_DEV}" == "false" ]]; then
if [[ "${LOCO_OSTYPE}" == "macos" ]]; then
/usr/local/bin/bash ./src/main.sh "${@-}" && ./src/temp/finish.sh && kill -9 $PPID 2&>/dev/null
else
./src/main.sh "${@-}" && ./src/temp/finish.sh && kill -9 $PPID 2&>/dev/null
fi
else
# if dev is true, don't exit automatically
./src/main.sh "${@-}" && ./src/temp/finish.sh
fi