summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorosm0sis <osm0sis@outlook.com>2019-07-20 23:12:51 -0300
committerosm0sis <osm0sis@outlook.com>2019-07-20 23:12:51 -0300
commit958b2c873ab36f52c4830b3bb224c3753d5c47cd (patch)
tree23d70b5a56a95d10ccc87d1126c39e64687cec5d /tools
parentf1494f366de8d9106d1f0e3b99ca33cd9017cdf6 (diff)
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
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ak3-core.sh3
1 files changed, 2 insertions, 1 deletions
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;