26 lines
682 B
Fish
26 lines
682 B
Fish
|
#!/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
|
||
|
for directory in */
|
||
|
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
|
||
|
|