-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
executable file
·36 lines (36 loc) · 1.02 KB
/
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
#!/bin/sh
# File: dbrep.1.1
# System: D.B.SHDB.1.1
# Dependencies: -
# ------------------------------------------------
# Author: Daniel Bullimore
# Authors Email: -
# First Written: 2013
# ------------------------------------------------
# !If you make changes add your name to the list
# Last Modified (d/m/y):
# 6/5/2019 Daniel Bullimore
#
# ------------------------------------------------
# Copyright 2019 Daniel Bullimore
# D.B.SHDB is licensed under the The 3-Clause BSD License
# To view this license:
# https://github.com/DanielBullimore/D.B.SHDB/blob/master/LICENSE
#
#--------------
#---DISCRIPTION\
#---------------
# installs SHDB into user shell
# creates db executable in /usr/local/sbin so long as it doesnt exist
SHDBDIR=$(pwd);
if [ ! -f /usr/local/bin/db ]
then
echo "#!/bin/sh" | cat >> /usr/local/bin/db;
DBSTRING="cd $SHDBDIR && exec ./db.sh ";
DBSTRING2='"$@";';
echo "$DBSTRING $DBSTRING2" | cat >> /usr/local/bin/db;
chmod +x /usr/local/bin/db;
exit 0;
else
echo "db already exists in /usr/local/bin/";
fi;