From 958b2c873ab36f52c4830b3bb224c3753d5c47cd Mon Sep 17 00:00:00 2001 From: osm0sis Date: Sat, 20 Jul 2019 23:12:51 -0300 Subject: [PATCH] AK3: reset_ak: don't remove $ramdisk unless has already been unpacked - running reset_ak before an unpack would remove any included ramdisk files from zip, so only remove if $split_img is detected suggesting an unpack has already occurred --- tools/ak3-core.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/ak3-core.sh b/tools/ak3-core.sh index 4268992..e1ce1f7 100755 --- a/tools/ak3-core.sh +++ b/tools/ak3-core.sh @@ -606,7 +606,8 @@ reset_ak() { test -e $i && cp -af $i $current; done; fi; - rm -rf $bootimg $ramdisk $split_img $home/*-new* $home/*-files/current; + test -d $split_img && rm -rf $ramdisk; + rm -rf $bootimg $split_img $home/*-new* $home/*-files/current; if [ "$1" == "keep" ]; then test -d $home/rdtmp && mv -f $home/rdtmp $ramdisk;