-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadd.sh
executable file
·30 lines (22 loc) · 909 Bytes
/
add.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
#!/usr/bin/bash
echo "WARN: Moving this directory after install will cause failure."
# Finds the path of this install.sh
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
if [ -f "$BASE_DIR/config.json" ]; then
echo "$BASE_DIR/config.json exists."
else
echo "$FILE does not exist."
touch $BASE_DIR/config.json
echo "{}" > $BASE_DIR/config.json
fi
if [ -f "$BASE_DIR/history.json" ]; then
echo "$BASE_DIR/history.json exists."
else
touch $BASE_DIR/history.json
echo "{}" > $BASE_DIR/history.json
fi
konsole -e "python3 $BASE_DIR/rcst_config.py add"
python3 $BASE_DIR/rcst_build.py
SUDO_ASKPASS=/usr/bin/ksshaskpass sudo -A rm -f /usr/share/kservices5/ServiceMenus/rclone_share_tools.desktop
SUDO_ASKPASS=/usr/bin/ksshaskpass sudo -A cp $BASE_DIR/rclone_share_tools.desktop /usr/share/kservices5/ServiceMenus/rclone_share_tools.desktop
echo "Done"