bin: adjust moul and clean

This commit is contained in:
xeruf 2022-10-15 02:08:53 +02:00
parent 54c2d95ccb
commit 0878e51e6a
2 changed files with 5 additions and 3 deletions

View File

@ -21,8 +21,10 @@ find "$dir" -maxdepth 2 -not -name ".stfolder" -empty -printf "Removing empty %p
find -L -maxdepth 2 -type l -printf "Removing broken symlink %p\n" -delete 2>/dev/null find -L -maxdepth 2 -type l -printf "Removing broken symlink %p\n" -delete 2>/dev/null
highlight "y :: recursively remove empty folders and files" highlight "y :: recursively remove empty folders and files"
[[ $1 =~ "y" ]] && if [[ $1 =~ "y" ]]; then
find \( -name ".stfolder" -o -name ".*keep" -o -name ".git" \) -prune -o -empty -printf "Removing empty %p\n" -exec rm -d {} + find -name '.thumbnails' -printf "Pre-cleaning %p\n" -exec rm -r {} +
find \( -name ".stfolder" -o -name ".*keep" -o -name ".git" -o -name "tmp" -o -name ".nomedia" \) -prune -o -empty -printf "Removing empty %p\n" -exec rm -d {} +
fi
highlight "e :: remove downloaded emacs packages (rebuild takes minutes!)" highlight "e :: remove downloaded emacs packages (rebuild takes minutes!)"
[[ $1 =~ "e" ]] && [[ $1 =~ "e" ]] &&

View File

@ -20,7 +20,7 @@ esac
# FSTAB: BY LABEL # FSTAB: BY LABEL
if grep --word-regexp "LABEL=$arg" /etc/fstab if grep --word-regexp "LABEL=$arg" /etc/fstab
then # have to mount twice as the first one might be creating the directory then # have to mount twice as the first one might be creating the directory
mount -L "$@" 2>/dev/null || mount -L "$@" mount -L "$arg" "$@" 2>/dev/null || mount -L "$arg" "$@"
exit $? exit $?
fi fi
# FSTAB: BY MOUNTPOINT/NAME # FSTAB: BY MOUNTPOINT/NAME