From 0189dc14c99943b2cf210b93824e42d88d007f48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=B9i=20=C4=90=E1=BB=A9c=20Hi=E1=BB=81n?= <54226198+buihien224@users.noreply.github.com> Date: Tue, 5 Apr 2022 14:14:57 +0700 Subject: [PATCH] Update cus_add.sh --- cus_add.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cus_add.sh b/cus_add.sh index aed714c..e2e7989 100644 --- a/cus_add.sh +++ b/cus_add.sh @@ -2,7 +2,7 @@ permis() { -haa=$(find $1) +haa=$(sudo find $1) for i in $haa; do if [[ $i =~ "/bin/" ]]; then sudo chmod 755 $i @@ -29,21 +29,22 @@ linkcute=$(ls *.zip) if [[ -f $linkcute ]]; then echo "Phat hien $linkcute" mkdir working custom - dd if=/dev/zero bs=1M count=612 >> addon.img - resize2fs addon.img - e2fsck -f addon.img + dd if=/dev/zero bs=1M count=612 >> addon.img + e2fsck -f -y addon.img > /dev/null 2>&1 + resize2fs addon.img > /dev/null 2>&1 sudo mount addon.img working echo "Giai nen $linkcute" - cp $linkcute custom ; cd custom + mv $linkcute custom ; cd custom jar xf $linkcute ; rm $linkcute cd .. echo "Copy file vao addon.img" - sudo cp -rf custom/* working/system + sudo cp -rf custom/* working echo "Set quyen va SEcontest" permis working sudo umount working - resize2fs -f -M addon.img + resize2fs -f -M addon.img > /dev/null 2>&1 rm -rf working custom echo "Xong, hay copy file addon.img vao module/update" + fi