2023-01-04 01:28:50 +00:00
|
|
|
#!/usr/bin/env fish
|
|
|
|
set -l me (status dirname)
|
|
|
|
|
|
|
|
set -l config_dir "$HOME/.config"
|
|
|
|
if not test -e $config_dir
|
|
|
|
mkdir $HOME/.config
|
|
|
|
else
|
|
|
|
# Move over helix/runtime here first (before deletion)
|
|
|
|
if test -e $config_dir/helix/runtime
|
|
|
|
if not test -e $config_dir/helix/runtime
|
|
|
|
mv "$config_dir/helix/runtime" "$me/helix/"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2024-03-09 16:13:38 +00:00
|
|
|
for directory in *
|
2023-01-04 01:28:50 +00:00
|
|
|
if test -L (string sub -e -1 $config_dir/$directory)
|
|
|
|
echo "already have a simlink for <$(string sub -e -1 $directory)>"
|
|
|
|
continue
|
|
|
|
else
|
|
|
|
echo "removing <$directory>"
|
|
|
|
rm -rf "$config_dir/$directory"
|
|
|
|
end
|
|
|
|
ln -s "$(pwd)/$directory" "$HOME/.config/"
|
|
|
|
end
|
|
|
|
|