diff options
author | Elliott Hughes <enh@google.com> | 2024-05-01 16:05:29 +0000 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2024-05-01 16:05:29 +0000 |
commit | 5b66401bd12e70550d145a834a4a225d4237ea96 (patch) | |
tree | fa2cc70b88fbaa0203f9d0ca8bbcb6a8a5e84ebc | |
parent | 7c075dd489f6d53217c2656b20ef619230baa367 (diff) | |
download | toybox-5b66401bd12e70550d145a834a4a225d4237ea96.tar.gz |
Fix the post_update.sh annoyance that can remove a home directory.
Test: ./post_update.sh
Change-Id: I0796421b6903d1f7ce185418a141c61f9be9d4a2
-rwxr-xr-x | post_update.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/post_update.sh b/post_update.sh index c07d65ae..2b42dba9 100755 --- a/post_update.sh +++ b/post_update.sh @@ -1,8 +1,13 @@ #!/bin/bash +# external-updater provides: # $1 Path to the new version. # $2 Path to the old version. +if [ "$#" -lt 1 ]; then + echo 'need at least the path to the current version!' + exit 1 +fi cd $1 set -e |