-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
38 lines (31 loc) · 812 Bytes
/
install.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
#!/bin/bash
# (C) 27.05.2019 zhgzhg
# installation script for sshfsmount and sshfsunmount tools
if [[ "$(id -u)" != "0" ]]; then
echo [You need to run this script as root!]
exit 1
fi
echo -e "\nInstalling sshfsmount project...\n"
echo Copying sshfsmount to /usr/local/bin
cp -f sshfsmount.sh /usr/local/bin/sshfsmount
if [[ $? -eq 0 ]]; then
echo Success!
chmod 755 /usr/local/bin/sshfsmount
else
echo Fail!
fi
SUCCESS=0
echo Copying sshfsunmount to /usr/local/bin
cp -f sshfsunmount.sh /usr/local/bin/sshfsunmount
if [[ $? -eq 0 ]]; then
echo Success!
chmod 755 /usr/local/bin/sshfsunmount
SUCCESS=1
else
echo Fail!
fi
echo -e "\nDone!\n"
if [[ ${SUCCESS} -eq 1 ]]; then
echo Now you can use directly these tools as a commands named
echo 'sshfsmount' and 'sshfsunmount'.
fi