Compare commits

...

2 Commits

Author SHA1 Message Date
Sage Vaillancourt 1e1ee467f6 Return pushdot error codes 2024-02-19 00:49:01 -05:00
Sage Vaillancourt 99e817e42c Show diff message 2024-02-19 00:47:38 -05:00
1 changed files with 10 additions and 1 deletions

View File

@ -102,12 +102,16 @@ function push-dconf {
function pushdot {
cd "$DOT_DIR" || return 1
local res
if [ $# -eq 0 ]; then
git commit -a && git push -u origin main && push-dconf
res="$?"
else
git commit -a -m "$@" && git push -u origin main && push-dconf
res="$?"
fi
cd -
return $res
}
function getdot {
@ -117,7 +121,12 @@ function getdot {
rm /tmp/dconf-dump
scp -P 11275 'sage@sagev.space:~/dconf-dump' /tmp/dconf-dump
dconf-dump > /tmp/current-dconf-dump
git --no-pager diff --no-index /tmp/dconf-dump /tmp/current-dconf-dump
if ! git --no-pager diff --no-index /tmp/current-dconf-dump /tmp/dconf-dump &> /dev/null; then
echo
echo "Incoming conf changes:"
echo
git --no-pager diff --no-index /tmp/current-dconf-dump /tmp/dconf-dump
fi
dconf load / < /tmp/dconf-dump || return 1
else
echo "An alias for scpace has not been defined on this device!"