diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-07-21 17:49:52 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-07-21 17:49:52 +0000 |
commit | 361bd76f7e26e2c4a78aebc79b8309f5c7771518 (patch) | |
tree | dd870e08fe02fdb04952e8d721ba4187f69b62e1 | |
parent | f2f28c86a203a347cc33c9ed5091a8a83f4d2ec8 (diff) |
scripts/env: fix initialization of files/ when creating a new environment (patch from #7603)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22336 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rwxr-xr-x | scripts/env | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/env b/scripts/env index 65594f9a5..882b42a49 100755 --- a/scripts/env +++ b/scripts/env @@ -192,7 +192,8 @@ env_new() { if [ -f "$BASEDIR/.config" -o -d "$BASEDIR/files" ]; then if ask_bool 1 "Do you want to keep your current config and files?"; then [ -d "$BASEDIR/files" -a \! -L "$BASEDIR/files" ] && { - mv "$BASEDIR/files/"* "$ENVDIR/" 2>/dev/null + mkdir -p "$ENVDIR/files" + mv "$BASEDIR/files/*" "$ENVDIR/files/" 2>/dev/null rmdir "$BASEDIR/files" } env_sync |