|
|
@ -6562,18 +6562,29 @@ Parameters: |
|
|
" |
|
|
" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
# nocron noprofile |
|
|
|
|
|
_installOnline() { |
|
|
|
|
|
|
|
|
# nocron noprofile branch |
|
|
|
|
|
installOnline() { |
|
|
_info "Installing from online archive." |
|
|
_info "Installing from online archive." |
|
|
_nocron="$1" |
|
|
_nocron="$1" |
|
|
_noprofile="$2" |
|
|
|
|
|
if [ ! "$BRANCH" ]; then |
|
|
|
|
|
BRANCH="master" |
|
|
|
|
|
|
|
|
if [ "$_nocron" ]; then |
|
|
|
|
|
_nocron="--no-cron" |
|
|
|
|
|
fi |
|
|
|
|
|
shift |
|
|
|
|
|
_noprofile="$1" |
|
|
|
|
|
if [ "$_noprofile" ]; then |
|
|
|
|
|
_noprofile="--no-profile" |
|
|
|
|
|
fi |
|
|
|
|
|
shift |
|
|
|
|
|
|
|
|
|
|
|
_branch="$3" |
|
|
|
|
|
if [ ! "$_branch" ]; then |
|
|
|
|
|
_branch="master" |
|
|
fi |
|
|
fi |
|
|
|
|
|
shift |
|
|
|
|
|
|
|
|
target="$PROJECT/archive/$BRANCH.tar.gz" |
|
|
|
|
|
|
|
|
target="$PROJECT/archive/$_branch.tar.gz" |
|
|
_info "Downloading $target" |
|
|
_info "Downloading $target" |
|
|
localname="$BRANCH.tar.gz" |
|
|
|
|
|
|
|
|
localname="$_branch.tar.gz" |
|
|
if ! _get "$target" >$localname; then |
|
|
if ! _get "$target" >$localname; then |
|
|
_err "Download error." |
|
|
_err "Download error." |
|
|
return 1 |
|
|
return 1 |
|
|
@ -6585,9 +6596,9 @@ _installOnline() { |
|
|
exit 1 |
|
|
exit 1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
cd "$PROJECT_NAME-$BRANCH" |
|
|
|
|
|
|
|
|
cd "$PROJECT_NAME-$_branch" |
|
|
chmod +x $PROJECT_ENTRY |
|
|
chmod +x $PROJECT_ENTRY |
|
|
if ./$PROJECT_ENTRY install "$_nocron" "" "$_noprofile"; then |
|
|
|
|
|
|
|
|
if ./$PROJECT_ENTRY --install $_nocron $_noprofile $@; then |
|
|
_info "Install success!" |
|
|
_info "Install success!" |
|
|
_initpath |
|
|
_initpath |
|
|
_saveaccountconf "UPGRADE_HASH" "$(_getUpgradeHash)" |
|
|
_saveaccountconf "UPGRADE_HASH" "$(_getUpgradeHash)" |
|
|
@ -6595,7 +6606,7 @@ _installOnline() { |
|
|
|
|
|
|
|
|
cd .. |
|
|
cd .. |
|
|
|
|
|
|
|
|
rm -rf "$PROJECT_NAME-$BRANCH" |
|
|
|
|
|
|
|
|
rm -rf "$PROJECT_NAME-$_branch" |
|
|
rm -f "$localname" |
|
|
rm -f "$localname" |
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
|
@ -6623,7 +6634,7 @@ upgrade() { |
|
|
[ -z "$FORCE" ] && [ "$(_getUpgradeHash)" = "$(_readaccountconf "UPGRADE_HASH")" ] && _info "Already uptodate!" && exit 0 |
|
|
[ -z "$FORCE" ] && [ "$(_getUpgradeHash)" = "$(_readaccountconf "UPGRADE_HASH")" ] && _info "Already uptodate!" && exit 0 |
|
|
export LE_WORKING_DIR |
|
|
export LE_WORKING_DIR |
|
|
cd "$LE_WORKING_DIR" |
|
|
cd "$LE_WORKING_DIR" |
|
|
_installOnline "nocron" "noprofile" |
|
|
|
|
|
|
|
|
installOnline "nocron" "noprofile" |
|
|
); then |
|
|
); then |
|
|
_info "Upgrade success!" |
|
|
_info "Upgrade success!" |
|
|
exit 0 |
|
|
exit 0 |
|
|
@ -7458,11 +7469,6 @@ _process() { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if [ "$INSTALLONLINE" ]; then |
|
|
|
|
|
INSTALLONLINE="" |
|
|
|
|
|
_installOnline |
|
|
|
|
|
exit |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
main() { |
|
|
main() { |
|
|
[ -z "$1" ] && showhelp && return |
|
|
[ -z "$1" ] && showhelp && return |
|
|
|