aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-07-21 17:49:52 +0000
committerFelix Fietkau <nbd@openwrt.org>2010-07-21 17:49:52 +0000
commit3d492106cd51187a854d591be3423e4489424ea9 (patch)
treedd870e08fe02fdb04952e8d721ba4187f69b62e1 /scripts
parent3031cf083af2faa95016d8994329404926819b39 (diff)
downloadupstream-3d492106cd51187a854d591be3423e4489424ea9.tar.gz
upstream-3d492106cd51187a854d591be3423e4489424ea9.tar.bz2
upstream-3d492106cd51187a854d591be3423e4489424ea9.zip
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
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/env3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/env b/scripts/env
index 65594f9a5d..882b42a49a 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