-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreset.sh
51 lines (39 loc) · 943 Bytes
/
reset.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Check to see if a file exists, if it does then remove it, else continue on
removeFile() {
file="$1"
if [ -f "$file" ]
then
echo "$file found and being removed..."
sleep 2
rm -i "$file"
else
echo "$file does not currently exist; continuing"
return
fi
}
# Check to see if a dir exists, if it does then remove it, else continue on
removeDir() {
dir="$1"
if [ -d "$dir"/ ]
then
echo "$dir found and being removed..."
sleep 2
rm -rf -i "$dir"
else
echo "$dir do(es) not currently exist; continuing..."
return
fi
}
# -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- -
# Actual script
# -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- -
removeDir node_modules
sleep 2
removeFile yarn.lock
sleep 2
removeDir dist
echo "******* REMOVALS COMPLETE *******"
yarn install
sleep 2
yarn build
echo "******* INSTALLATIONS COMPLETE *******"