From 7f667fed1826712fcdcce698fd3a55d90c540ddd Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sun, 29 Dec 2019 00:45:49 +0800 Subject: [PATCH] Allow customize.sh to skip unzip Close #2184 --- scripts/module_installer.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/module_installer.sh b/scripts/module_installer.sh index 8b9af0ee2..5a6b15f94 100644 --- a/scripts/module_installer.sh +++ b/scripts/module_installer.sh @@ -122,11 +122,15 @@ if is_legacy_script; then else print_modname - ui_print "- Extracting module files" - unzip -o "$ZIPFILE" -x 'META-INF/*' -d $MODPATH >&2 + unzip -o "$ZIPFILE" customize.sh -d $MODPATH >&2 - # Default permissions - set_perm_recursive $MODPATH 0 0 0755 0644 + if ! grep -q '^SKIPUNZIP=' $MODPATH/customize.sh 2>/dev/null; then + ui_print "- Extracting module files" + unzip -o "$ZIPFILE" -x 'META-INF/*' -d $MODPATH >&2 + + # Default permissions + set_perm_recursive $MODPATH 0 0 0755 0644 + fi # Load customization script [ -f $MODPATH/customize.sh ] && . $MODPATH/customize.sh