diff options
author | osm0sis <osm0sis@outlook.com> | 2019-07-20 23:12:51 -0300 |
---|---|---|
committer | osm0sis <osm0sis@outlook.com> | 2019-07-20 23:12:51 -0300 |
commit | 958b2c873ab36f52c4830b3bb224c3753d5c47cd (patch) | |
tree | 23d70b5a56a95d10ccc87d1126c39e64687cec5d | |
parent | f1494f366de8d9106d1f0e3b99ca33cd9017cdf6 (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
-rwxr-xr-x | tools/ak3-core.sh | 3 |
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; |