From 8ddb760951f51ae350701b5fad088bce83343422 Mon Sep 17 00:00:00 2001 From: buihien224 Date: Tue, 5 Oct 2021 22:09:48 +0700 Subject: [PATCH] my bad, commit wrong file --- hungsvvl.sh | 18 +++++++++++++++--- mktemplate.sh | 19 +++---------------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/hungsvvl.sh b/hungsvvl.sh index 0fe200b..d18f716 100644 --- a/hungsvvl.sh +++ b/hungsvvl.sh @@ -18,9 +18,21 @@ if [[ -f "system.img" ]] then echo -e "\e[1;33mGenerating..........\e[0m" systemsize=$(find "system.img" -printf "%s") - wget -q $bhlnk - unzip dynamic1.zip - rm dynamic1.zip + echo "check if the template exists" + if [[ -f "dynamic1.zip" ]] + then + echo "extracting template" + unzip dynamic1.zip + else + echo "downloading template" + wget -q $bhlnk + if [[ -f "dynamic1.zip" ]] + then + unzip dynamic1.zip + else echo "report to @bhlnk" + exit 1 + fi + fi echo -e "\e[1;33mCoping system.img...\e[0m" cp system.img tmp sed -i "s/test/$codename/g" $scpt diff --git a/mktemplate.sh b/mktemplate.sh index fba672e..a55d25c 100644 --- a/mktemplate.sh +++ b/mktemplate.sh @@ -16,22 +16,9 @@ if [[ -f "system.img" ]] then echo -e "\e[1;31mGenerating..........\e[0m" systemsize=$(find "system.img" -printf "%s") - echo "check if the template exists" - if [[ -f "dynamic1.zip" ]] - then - echo "extracting template" - unzip dynamic1.zip - else - echo "downloading template" - wget -q $bhlnk - if [[ -f "dynamic1.zip" ]] - then - unzip dynamic1.zip - else echo "report to @bhlnk" - exit 1 - fi - unzip dynamic1.zip - fi + wget -q $bhlnk + unzip dynamic1.zip + rm dynamic1.zip echo -e "\e[1;31mCoping system.img...\e[0m" cp system.img tmp sed -i "s/test/$codename/g" $scpt