-
Notifications
You must be signed in to change notification settings - Fork 1
/
cli.sh
42 lines (38 loc) · 911 Bytes
/
cli.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
#!/usr/bin/env bash
if ! clear &> /dev/null
then
echo "";
fi
echo "";
echo "[1/3] 🔥 Checking Crates.io"
if ! cargo check &> /dev/null
then
echo "😖 There was a problem running \"cargo check\""
exit;
fi
echo "👍 Ok [1/3]"
echo "[2/3] ⚡ Building API..."
echo " - Warning: This API can sometimes take a while to build and of course it depends on the amount of processing."
echo ""
if ! cargo build -q &> /dev/null
then
echo "😖 There was a problem running \"cargo run\""
exit
fi
echo "👍 Ok [2/3]"
echo "[3/3] 💻 Preparing command..."
if ! sudo rm -rf /usr/bin/httpinteraction &> /dev/null
then
echo "😖 There was a problem running \"mv\""
exit
fi
echo "."
echo ".."
if ! sudo mv ./target/debug/httpinteraction /usr/bin &> /dev/null
then
echo "😖 There was a problem running \"mv\""
exit
fi
echo "..."
echo "👍 Ok [3/3]"
echo ""