Compare commits
No commits in common. "391aba78696d573bb44a409bf289dc168ad86447" and "5c66881c3e859424431d3f7bd5497c942f1e5b8f" have entirely different histories.
391aba7869
...
5c66881c3e
|
@ -1,16 +1,16 @@
|
|||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
shared_themes_dir=/usr/share/themes/
|
||||
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"
|
||||
|
||||
if [ ! -e "$home_local_themes_dir" ]; then
|
||||
mkdir -p "$home_local_themes_dir"
|
||||
if [ ! -e $home_local_themes_dir ]; then
|
||||
mkdir -p $home_local_themes_dir
|
||||
echo "Directory $home_local_themes_dir is created."
|
||||
fi
|
||||
|
||||
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
|
||||
rsync -av --delete --progress "${source_theme_dirs[@]}" "$target_themes_dir"
|
||||
echo "Directory $target_themes_dir is synchronized with" "${source_theme_dirs[@]}"
|
||||
done
|
||||
echo "Set watch for $source_theme_dirs directories ..."
|
||||
while inotifywait -r $source_theme_dirs; do
|
||||
rsync -av --delete --progress $source_theme_dirs $target_themes_dir
|
||||
echo "Directory $target_themes_dir is synchronized with $source_theme_dirs."
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue
Block a user