💥 scripts(install): mkdir before copying

This commit is contained in:
retrozinndev
2025-05-15 17:18:37 -03:00
parent f0d49833e1
commit c6bcdcc763
+2 -1
View File
@@ -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"
mkdir -p "$dest" # create parents
if [[ -f "./$dir" ]]; then if [[ -f "./$dir" ]]; then
mkdir -p "$dest" # create parents
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