-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·72 lines (55 loc) · 1.5 KB
/
install.sh
File metadata and controls
executable file
·72 lines (55 loc) · 1.5 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
# tubes installer casa@ujo.guru 2026
# Usage:
# chmod +x install.sh
# ./install.sh
export GRBL_VERBOSE=2
export GRBL_COLOR=true
source color.sh
source common.sh
alias_made=
base=$HOME/.tubes
# make folder for configs and data
[[ -d $base ]] || mkdir -p $base/bin
# check isntallation
if [[ -f $base/bin/tubes.sh ]]; then
if gr.ask "already installed, re-install" ; then
rm $base/bin/tubes.sh
else
exit 0
fi
if gr.ask "overwrite configs?"; then
rm $base/tubes.cfg
fi
if gr.ask "delete data and logs?"; then
[[ -d $base/cache ]] && rm -r $base/cache
[[ -d $base/logs ]] && rm -r $base/logs
fi
fi
# copy files
cp tubes.cfg $base
cp tubes.sh color.sh common.sh $base/bin
chmod +x $base/bin/tubes.sh
if gr.ask "make 'tubes' alias?"; then
if ! grep $HOME/.bashrc -e "tubes.sh"; then
echo -e "\nalias tubes=$base/bin/tubes.sh\n" >> $HOME/.bashrc
fi
alias_made=true
fi
# if ge.ask "make tubes.sh to launch anywhere?"; then
# if ! grep $HOME/.profiles -e "tubes.sh"; then
# echo -e "\n# tubes.sh\nif [ -d $HOME/.$base ] ; then \n\tPATH=$base/bin:$PATH \nfi \n" >> $HOME/.profiles
# gr.msg "added path conditional to ~/.profiles, please log in/log out"
# fi
# fi
if gr.ask "install required software?"; then
source $base/bin/tubes.sh
youtube.install && youtube.upgrade
fi
gr.msg -n "tubes installation " ; gr.msg -c green "done"
gr.msg -n "try: "
if [[ $alias_made ]] ; then
gr.msg -h "'tubes kingston wall'"
else
gr.msg -h "'$base/bin/tubes.sh laila kinnunen'"
fi