Remove unnecessary if statements

This commit is contained in:
Rokosun 2022-10-01 18:30:00 +02:00
parent 8ae2c3d651
commit 99c46b44ab

View File

@ -4,16 +4,8 @@ home_local_themes_dir="$HOME/.local/share/themes/"
source_theme_dirs=("$shared_themes_dir" "$home_local_themes_dir")
target_themes_dir="$HOME/.themes"
if [ ! -e "$home_local_themes_dir" ]; then
mkdir -p "$home_local_themes_dir"
echo "Directory $home_local_themes_dir is created."
fi
if [ ! -e "$target_themes_dir" ]; then
mkdir -p "$target_themes_dir"
echo "Directory $home_local_themes_dir is created."
fi
mkdir -p "$target_themes_dir" "$home_local_themes_dir" ||
{ echo "failed to make directoris $target_themes_dir & $home_local_themes_dir"; exit 1; }
echo "Set watch for" "${source_theme_dirs[@]}" "directories ..."
while inotifywait -qr -e 'modify,attrib,move,move_self,create,delete,delete_self,unmount' "${source_theme_dirs[@]}"; do