|
1 | 1 | #!/bin/bash |
2 | 2 | # |
3 | | -# V6.0 |
| 3 | +# V8.6 |
4 | 4 | # |
5 | 5 | # EZ Installer. Run from the bash command line: |
6 | 6 | # |
7 | 7 | # curl -L https://raw.githubusercontent.com/gitbls/sdm/master/EZsdmInstaller | bash |
8 | 8 | # |
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) |
12 | 17 | # |
13 | 18 | # At the moment requires apt-based package installs. Easy to fix, of course. It's only code... |
14 | 19 | # |
@@ -55,10 +60,17 @@ myscript="$0 $@" |
55 | 60 | # |
56 | 61 | # Create directories and download sdm |
57 | 62 | # |
58 | | -[ "$1" != "" ] && dir="$1" || dir="/usr/local/sdm" |
| 63 | +[ "$1" == "" ] && branch="master" || branch="$1" |
| 64 | +[ "$2" != "" ] && dir="$2" || dir="/usr/local/sdm" |
59 | 65 |
|
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 |
62 | 74 |
|
63 | 75 | sudo="" |
64 | 76 | if [ -d $dir ] |
@@ -122,10 +134,12 @@ then |
122 | 134 | echo "* Invoke sdm with 'sudo sdm'" |
123 | 135 | else |
124 | 136 | 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'" |
125 | 139 | fi |
126 | 140 |
|
127 | 141 | echo $" |
128 | | - Complete sdm documentation: https://github.com/gitbls/sdm/wiki |
| 142 | + Complete sdm documentation: https://github.com/gitbls/sdm/tree/$branch/Docs |
129 | 143 | " |
130 | 144 |
|
131 | 145 | if [ $dlerrors -ne 0 ] |
|
0 commit comments