fix: [Update] force manual update, fix #443

This commit is contained in:
Terrtia 2019-12-10 16:12:05 +01:00
parent d45d02b667
commit 362afc2253
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0
2 changed files with 10 additions and 3 deletions

View file

@ -445,7 +445,7 @@ function shutdown {
function update() {
bin_dir=${AIL_HOME}/bin
bash -c "python3 $bin_dir/Update.py"
bash -c "python3 $bin_dir/Update.py $1"
exitStatus=$?
if [ $exitStatus -ge 1 ]; then
echo -e $RED"\t* Update Error"$DEFAULT
@ -576,7 +576,7 @@ while [ "$1" != "" ]; do
;;
-m | --menu ) menu_display;
;;
-u | --update ) update;
-u | --update ) update "--manual";
;;
-t | --thirdpartyUpdate ) update_thirdparty;
;;

View file

@ -12,6 +12,7 @@ Update AIL clone and fork
import configparser
import os
import sys
import argparse
import subprocess
@ -342,7 +343,13 @@ if __name__ == "__main__":
print('* Updating AIL ... *')
print('******************************************************************{}'.format(TERMINAL_DEFAULT))
if auto_update_enabled(cfg):
# manual updates
parser = argparse.ArgumentParser()
parser.add_argument("--manual", nargs='?', const=True, default=False)
args = parser.parse_args()
manual_update = args.manual
if auto_update_enabled(cfg) or manual_update:
if check_if_files_modified():
is_fork = repo_is_fork()
if is_fork: