forked from a7r3/LazyScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscribt.rc
More file actions
executable file
·24 lines (23 loc) · 775 Bytes
/
scribt.rc
File metadata and controls
executable file
·24 lines (23 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# Function to EasyClone and find ScriBt directories
function scribt()
{
if [[ "$1" == "get" ]]; then
echo -e "\n${INF} Branch : $2\n\n${INF} Destination : $3\n";
git clone https://github.com/ScriBt/ScriBt -b $2 $3;
cd "$3";
echo "$3" >> ~/.scribtrc;
elif [[ "$1" == "find" ]]; then
CT=1;
while read line; do
echo -e "${CT}. $line";
LOCS=( "${LOCS}" "$line" );
(( CT++ ));
done <<< "$(cat ~/.scribtrc)";
echo -e "${CL_WYT} These are the locations\nSelect one\n";
prompt LOC;
cd $(eval echo "\${LOCS[$(( LOC + 1 ))]}");
else
echo -e "Usage: $0 get <branch> <clonedir>\n\t$0 find - To find ScriBt directories";
fi
} # scribt