new install process
This commit is contained in:
+1
-5
@@ -2,19 +2,15 @@
|
||||
|
||||
|
||||
function install() {
|
||||
echo "install on: $HOSTNAME"
|
||||
echo ----------------------
|
||||
|
||||
[ "$(id -u)" -ne 0 ] && echo 'root privilege required' && exit 1
|
||||
|
||||
if [[ ! $CURDIR == '/opt/miaou-bash' ]]; then
|
||||
# download and fullfill /opt/miaou-bash, then run it from folder
|
||||
|
||||
if [[ -L /opt/miaou-bash ]]; then
|
||||
cd /opt/miaou-bash && ./install.sh "$PARAM1"
|
||||
cd /opt/miaou-bash && ./install.sh
|
||||
exit 0
|
||||
else
|
||||
|
||||
rm -rf /opt/miaou-bash
|
||||
TEMP=$(mktemp -d)
|
||||
cd "$TEMP" || return
|
||||
|
||||
Reference in New Issue
Block a user