Changeset 29261


Ignore:
Timestamp:
2011-11-19T18:15:50+01:00 (6 years ago)
Author:
nbd
Message:

scripts/env: make mv and cp operations more robust (treat dotfiles appropriately) (based on patch by Rolf Leggewie)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/env

    r29260 r29261  
    139139        if ask_bool 1 "Do you want to keep your current config and files"; then 
    140140                mkdir -p "$BASEDIR/files" 
     141                shopt -s dotglob 
    141142                cp -a "$ENVDIR/files/"* "$BASEDIR/files" 2>/dev/null >/dev/null 
     143                shopt -u dotglob 
    142144                cp "$ENVDIR/.config" "$BASEDIR/" 
    143145        else 
     
    194196                        [ -d "$BASEDIR/files" -a \! -L "$BASEDIR/files" ] && { 
    195197                                mkdir -p "$ENVDIR/files" 
     198                                shopt -s dotglob 
    196199                                mv "$BASEDIR/files/"* "$ENVDIR/files/" 2>/dev/null 
     200                                shopt -u dotglob 
    197201                                rmdir "$BASEDIR/files" 
    198202                        } 
Note: See TracChangeset for help on using the changeset viewer.