Don't push extensions if they haven't changed
This commit is contained in:
parent
2a0c7d996f
commit
b35022a684
|
@ -118,7 +118,12 @@ function push-extensions {
|
|||
echo "gnome-extensions is not installed!"
|
||||
return
|
||||
fi
|
||||
mv /tmp/gnome-extension-list /tmp/prev-gnome-extension-list &> /dev/null
|
||||
gnome-extensions list > /tmp/gnome-extension-list
|
||||
# If there is NO difference, skip scp
|
||||
if [[ "$1" != "--force" ]] && diff /tmp/gnome-extension-list /tmp/prev-gnome-extension-list &> /dev/null; then
|
||||
return
|
||||
fi
|
||||
scp -P 11275 /tmp/gnome-extension-list 'sage@sagev.space:~/gnome-extension-list'
|
||||
}
|
||||
|
||||
|
@ -127,6 +132,7 @@ function load-extensions {
|
|||
echo "gnome-extensions is not installed!"
|
||||
return
|
||||
fi
|
||||
scp -P 11275 'sage@sagev.space:~/gnome-extension-list' /tmp/gnome-extension-list
|
||||
local existing="$(gnome-extensions list)"
|
||||
for ext in $(cat /tmp/gnome-extension-list); do
|
||||
if grep "$ext" <(echo $existing) &> /dev/null; then
|
||||
|
@ -167,9 +173,8 @@ function getdot {
|
|||
fi
|
||||
cd "$DOT_DIR" || return 1
|
||||
git pull && ./copy.sh
|
||||
rm /tmp/dconf-dump &> /dev/null
|
||||
scp -P 11275 'sage@sagev.space:~/gnome-extension-list' /tmp/gnome-extension-list
|
||||
load-extensions
|
||||
rm /tmp/dconf-dump &> /dev/null
|
||||
scp -P 11275 'sage@sagev.space:~/dconf-dump' /tmp/dconf-dump
|
||||
dconf-dump > /tmp/current-dconf-dump
|
||||
if ! git --no-pager diff --no-index /tmp/current-dconf-dump /tmp/dconf-dump &> /dev/null; then
|
||||
|
|
Loading…
Reference in New Issue