💥 scripts(install): mkdir before copying
This commit is contained in:
+2
-1
@@ -49,8 +49,9 @@ if [[ $1 == "dots" ]] || [[ $input =~ "y" ]]; then
|
|||||||
dest=$XDG_CONFIG_HOME/$dir
|
dest=$XDG_CONFIG_HOME/$dir
|
||||||
|
|
||||||
echo "-> Installing $dir in $dest"
|
echo "-> Installing $dir in $dest"
|
||||||
if [[ -f "./$dir" ]]; then
|
|
||||||
mkdir -p "$dest" # create parents
|
mkdir -p "$dest" # create parents
|
||||||
|
|
||||||
|
if [[ -f "./$dir" ]]; then
|
||||||
rm -f "$dest" # delete unused directory
|
rm -f "$dest" # delete unused directory
|
||||||
cp -f "./$dir" "$dest" # copy actual file
|
cp -f "./$dir" "$dest" # copy actual file
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user