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!"
|
echo "gnome-extensions is not installed!"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
mv /tmp/gnome-extension-list /tmp/prev-gnome-extension-list &> /dev/null
|
||||||
gnome-extensions list > /tmp/gnome-extension-list
|
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'
|
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!"
|
echo "gnome-extensions is not installed!"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
scp -P 11275 'sage@sagev.space:~/gnome-extension-list' /tmp/gnome-extension-list
|
||||||
local existing="$(gnome-extensions list)"
|
local existing="$(gnome-extensions list)"
|
||||||
for ext in $(cat /tmp/gnome-extension-list); do
|
for ext in $(cat /tmp/gnome-extension-list); do
|
||||||
if grep "$ext" <(echo $existing) &> /dev/null; then
|
if grep "$ext" <(echo $existing) &> /dev/null; then
|
||||||
|
@ -167,9 +173,8 @@ function getdot {
|
||||||
fi
|
fi
|
||||||
cd "$DOT_DIR" || return 1
|
cd "$DOT_DIR" || return 1
|
||||||
git pull && ./copy.sh
|
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
|
load-extensions
|
||||||
|
rm /tmp/dconf-dump &> /dev/null
|
||||||
scp -P 11275 'sage@sagev.space:~/dconf-dump' /tmp/dconf-dump
|
scp -P 11275 'sage@sagev.space:~/dconf-dump' /tmp/dconf-dump
|
||||||
dconf-dump > /tmp/current-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
|
if ! git --no-pager diff --no-index /tmp/current-dconf-dump /tmp/dconf-dump &> /dev/null; then
|
||||||
|
|
Loading…
Reference in New Issue