-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
32 lines (28 loc) · 850 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
#!/bin/bash
##############################################################
# MSH (Minimal Shell) Installation Script #
# Author: Maxwell Nana Forson <[email protected]> #
# #
# The script takes care of building the executable file, then #
# copies it to the /usr/bin/ directory making the msh shell #
# accessible from anywhere on the entire system #
##############################################################
if [ $UID -ne 0 ]; then
echo "You need to be root!"
exit 1
fi
# Build the executable file
make && cp msh /usr/bin/msh
if [ $? -eq 0 ]; then
# clean up
echo
echo "Cleaning up..."
make clean
echo
echo "Success: msh is now installed! :-)"
echo "Execute it by running: msh"
else
# pobably an error occured
echo "An error occured while installing!"
echo "Please try again."
fi