You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dotfiles/folder-setup.fish

38 lines
637 B
Fish

#!/usr/bin/env fish
set whitelist inbox pics docs music movies
set blacklist Desktop Downloads/Telegram\ Desktop Downloads Documents
set inbox inbox
# make sure whitelisted items exist
set_color green
for folder in $whitelist
test ! -d ~/"$folder"
and mkdir -p ~/"$folder"
and echo " * created ~/$folder"
or echo " * skipping ~/$folder"
# echo "==="
end
# move blacklisted items into inbox, delete folders
set_color red
for folder in $blacklist
test -d ~/"$folder"
and cp -r ~/"$folder"/. ~/"$inbox"
and rm -r ~/"$folder"
and echo " * removed ~/$folder"
or echo " * skipping ~/$folder"
#echo "==="
end