~skiqqy/bin

bin/run -rwxr-xr-x 1.1 KiB
c3280652Stephen Cochrane Added sandbox script 3 days ago
                                                                                
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
#!/bin/bash
# @Auther skiqqy
# Launches my web-applications in surf

PI="192.168.68.106" # Change ip to machine you wish to connect to.
SURF="https://surf.suckless.org/"

# Import stuff
SCRIPT_PATH=$(dirname $0)
. "$SCRIPT_PATH/import/alert.sh" > /dev/null 2>&1
[ ! $(command -v error) ] && echo "[WARNING] Missing 'alert.sh' import"

usage () {
	echo -e "Usage: launch [options]\n"
	echo -e "h:\tShows this message."
	echo -e "d:\tLaunches cockpit-docker."
}

[ ! $(command -v surf) ] && error "Missing 'surf' dependecy. Download it here: $SURF" 1 || echo "Found 'surf'"
[[ $# -eq 0 ]] && error "Must have arguments, for help use \'-h\'" 1 || echo "Starting launcher"

while getopts "hdbgfsmGH" opt
do
	case $opt in
		h)
			usage
			;;
		d)
			surf "$PI:9090/docker" &
			;;
		b)
			surf "https://blog.skiqqy.xyz/ghost/" &
			;;
		g)
			surf "https://git.skiqqy.xyz/" &
			;;
		f)
			surf "https://files.skiqqy.xyz/" &
			;;
		s)
			surf "https://social.skiqqy.xyz/" &
			;;
		m)
			surf "https://music.skiqqy.xyz/" &
			;;
		G)
			surf "https://github.com/skiqqy/" &
			;;
		H)
			surf "https://skiqqy.xyz/" &
			;;
		*)
			error "Invalid arg" 1
			;;
	esac
done