mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-22 14:05:39 +00:00
dir_prep fixes
Merge pull request #235 from icenine451/cooker-0.6.1b-icenine451
This commit is contained in:
commit
63f77057e1
|
@ -502,6 +502,12 @@ dir_prep() {
|
|||
mv -f "$symlink" "$symlink.old"
|
||||
fi
|
||||
|
||||
# if the real dir is already a symlink, unlink it first
|
||||
if [ -L "$real" ];
|
||||
then
|
||||
unlink "$real"
|
||||
fi
|
||||
|
||||
# if the real dir doesn't exist we create it
|
||||
if [ ! -d "$real" ];
|
||||
then
|
||||
|
@ -518,7 +524,7 @@ dir_prep() {
|
|||
if [ -d "$symlink.old" ];
|
||||
then
|
||||
echo "Moving the data from $symlink.old to $real" #DEBUG
|
||||
mv -f "$symlink".old/* $real
|
||||
mv -f "$symlink.old"/{.[!.],}* $real
|
||||
echo "Removing $symlink.old" #DEBUG
|
||||
rm -rf "$symlink.old"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue