mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-22 22:15: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"
|
mv -f "$symlink" "$symlink.old"
|
||||||
fi
|
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 the real dir doesn't exist we create it
|
||||||
if [ ! -d "$real" ];
|
if [ ! -d "$real" ];
|
||||||
then
|
then
|
||||||
|
@ -518,7 +524,7 @@ dir_prep() {
|
||||||
if [ -d "$symlink.old" ];
|
if [ -d "$symlink.old" ];
|
||||||
then
|
then
|
||||||
echo "Moving the data from $symlink.old to $real" #DEBUG
|
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
|
echo "Removing $symlink.old" #DEBUG
|
||||||
rm -rf "$symlink.old"
|
rm -rf "$symlink.old"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue