-
Notifications
You must be signed in to change notification settings - Fork 0
/
devmode
56 lines (56 loc) · 1.29 KB
/
devmode
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
cd ~/Thunder
echo "Welcome to Thunder in devmode!"
echo "Please note the following before you continue:"
echo "You might break your Thunder install."
echo "Do this at your own risk!"
echo "-----------------------------------------------"
tversion=$(thunder-cli --version)
echo "Thunder in Devmode "${tversion}
function options {
echo "OPTIONS:"
echo "1. View list of files"
echo "2. Search text files"
echo "3. Edit text files"
echo "4. Run an executable file (BASH, Python, etc.)"
echo "5. Use Git"
echo "6. Exit devmode"
read -p "Choose an option [1-6]: " thunderoption
if [[ $thunderoption == "1" ]] ;then
echo "root:"
ls
echo "database/"
ls database/*
echo "emulators/"
ls emulators/*
echo "doc/"
ls doc/*
fi
if [[ $thunderoption == "2" ]] ;then
read -p "Search input?: " tsearch
grep -s $tsearch *
grep -s $tsearch database/*
grep -s $tsearch emulators/*
grep -s $tsearch doc/*
fi
if [[ $thunderoption == "3" ]] ;then
read -p "File?: " tfile
nano $tfile
fi
if [[ $thunderoption == "4" ]] ;then
read -p "Language (python3, dash, bash, etc.)?: " tlanguage
read -p "File?: " tfiles
$tlanguage $tfiles
fi
if [[ $thunderoption == "5" ]] ;then
read -p "Git arguments (clone, pull, push, etc.)?: " tgit
git $tgit
fi
if [[ $thunderoption == "6" ]] ;then
echo "Exiting devmode..."
sleep 1s
exit
fi
options
}
options