Skip to content

Commit cd6969a

Browse files
committed
Update to run from Release tree
1 parent 5601752 commit cd6969a

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

EZsdmInstaller

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
#!/bin/bash
22
#
3-
# V6.0
3+
# V8.6
44
#
55
# EZ Installer. Run from the bash command line:
66
#
77
# curl -L https://raw.githubusercontent.com/gitbls/sdm/master/EZsdmInstaller | bash
88
#
9-
# Installs into /usr/local/sdm by default
10-
# You can specify a different directory as the first argument to the script. To use this
11-
# you must download the script to your computer and start it from the command line.
9+
# $1: Branch to install from (D:V8.6)
10+
# $2: Target install directory (D:/usr/local/sdm)
11+
# ** To use either of these arguments you must download this script to your system
12+
# and start it from the command line:
13+
# e.g., bash$ EZsdmInstaller V9.0 # Install V9.0 release to /usr/local/sdm
14+
# bash$ EZsdmInstaller "" /home/$(whoami)/sdm # Install master branch to /home/$(whoami)/sdm
15+
#
16+
# NOTE: Using this version on the master branch requires that the master branch is updated to V9.0 (NYI)
1217
#
1318
# At the moment requires apt-based package installs. Easy to fix, of course. It's only code...
1419
#
@@ -55,10 +60,17 @@ myscript="$0 $@"
5560
#
5661
# Create directories and download sdm
5762
#
58-
[ "$1" != "" ] && dir="$1" || dir="/usr/local/sdm"
63+
[ "$1" == "" ] && branch="master" || branch="$1"
64+
[ "$2" != "" ] && dir="$2" || dir="/usr/local/sdm"
5965

60-
[ "$SDMLAN" != "" ] && src=$SDMLAN || src="https://raw.githubusercontent.com/gitbls/sdm/master"
61-
[ "$SDMLAN" != "" ] && curl="scp" || curl="curl"
66+
if [ "$SDMLAN" != "" ]
67+
then
68+
src=$SDMLAN
69+
curl="scp"
70+
else
71+
src="https://github.com/gitbls/sdm/raw/$branch"
72+
curl="curl"
73+
fi
6274

6375
sudo=""
6476
if [ -d $dir ]
@@ -122,10 +134,12 @@ then
122134
echo "* Invoke sdm with 'sudo sdm'"
123135
else
124136
echo "* Invoke sdm with 'sudo $dir/sdm'"
137+
echo "* You can make an ease-of-use link with: sudo ln -s $dir/sdm /usr/local/bin/sdm"
138+
echo " so you can invoke sdm with 'sudo sdm'"
125139
fi
126140

127141
echo $"
128-
Complete sdm documentation: https://github.com/gitbls/sdm/wiki
142+
Complete sdm documentation: https://github.com/gitbls/sdm/tree/$branch/Docs
129143
"
130144

131145
if [ $dlerrors -ne 0 ]

0 commit comments

Comments
 (0)