-
Notifications
You must be signed in to change notification settings - Fork 111
/
install
executable file
·39 lines (30 loc) · 930 Bytes
/
install
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
#!/bin/bash
# This script does not download the package to install it.
# This is because I assume wget/curl might not work as proxy hasn't been set.
# Working from current directory having proxyman
TARGET_DIR="$HOME/.proxyman"
# verify if this is current directory
if [[ -f "main.sh" && -f "shellrc.sh" && -f "dropbox.sh" ]]; then
:
else
echo "please cd to the folder containing proxyman"
exit 1
fi
# copy the contents to ~/.proxyman/
echo "This will create ~/.local/bin if it doesn't exist."
echo "Also, add ~/.local/bin to \$PATH."
echo "Press any key to continue, or Ctrl+C to break."
read
mkdir -p $TARGET_DIR
cp * $TARGET_DIR
# add to path
mkdir -p $HOME/.local/bin
cp proxyman $HOME/.local/bin
chmod +x $HOME/.local/bin/proxyman
which proxyman &> /dev/null
if [ "$?" != 0 ]; then
echo "Failed to install :("
echo "You can still use it > ./main.sh set"
exit
fi
echo "Installed successfully."