Compare commits
2 Commits
8ae2c3d651
...
6dea6c5a89
Author | SHA1 | Date | |
---|---|---|---|
6dea6c5a89 | |||
99c46b44ab |
|
@ -4,19 +4,11 @@ home_local_themes_dir="$HOME/.local/share/themes/"
|
||||||
source_theme_dirs=("$shared_themes_dir" "$home_local_themes_dir")
|
source_theme_dirs=("$shared_themes_dir" "$home_local_themes_dir")
|
||||||
target_themes_dir="$HOME/.themes"
|
target_themes_dir="$HOME/.themes"
|
||||||
|
|
||||||
if [ ! -e "$home_local_themes_dir" ]; then
|
mkdir -p "$target_themes_dir" "$home_local_themes_dir" ||
|
||||||
mkdir -p "$home_local_themes_dir"
|
{ echo "failed to make directoris $target_themes_dir & $home_local_themes_dir"; exit 1; }
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
echo "Set watch for" "${source_theme_dirs[@]}" "directories ..."
|
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
|
while inotifywait -qr -e 'modify,attrib,move,move_self,create,delete,delete_self,unmount' "${source_theme_dirs[@]}"; do
|
||||||
rsync -av --delete --progress "${source_theme_dirs[@]}" "$target_themes_dir"
|
rsync -av --delete --progress "${source_theme_dirs[@]}" "$target_themes_dir"
|
||||||
echo "Directory $target_themes_dir is synchronized with" "${source_theme_dirs[@]}"
|
echo "Directory $target_themes_dir is synchronized with" "${source_theme_dirs[@]}"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue
Block a user