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