Compare commits

..

No commits in common. "9b1190cedf590f852356d4a81dc3e3f9596893bd" and "21f795acb796c90d4c0b712923ca59da91a49625" have entirely different histories.

1 changed files with 7 additions and 25 deletions

View File

@ -1,16 +1,6 @@
#!/bin/sh -e
file_changed() {
if [ ! -f "$1" ]; then
if [ ! -f "$2" ]; then
return 0
else
return 1
fi
fi
if [ ! -f "$2" ]; then
return 1
fi
oldfilehash="$(sha1sum "$1" | awk '{print $1}')"
newfilehash="$(sha1sum "$2" | awk '{print $1}')"
[ "${oldfilehash}" != "${newfilehash}" ]
@ -40,20 +30,16 @@ fi
chmod 700 "${GNUPGHOME}"
for key in \
B5108C5A158A6608AD3361DA1573F6D8EFE4D0CF \
04ADEF85EA6AEC6F75941E84468BBEEBB9EC6AEA \
; do
if ! gpg --list-keys "${key}" >/dev/null 2>&1; then
# key does not exist yet
gpg --keyserver pgp.mit.edu --recv-keys "${key}"
gpg --recv-keys "${key}"
fi
done
echo "Verifying updates..."
ref="origin/master"
diffref="${ref}"
if git rev-parse HEAD >/dev/null 2>&1; then
diffref="HEAD..${diffref}"
fi
git rev-list --format=oneline "${diffref}" | while IFS= read -r line; do
git rev-list --format=oneline HEAD..origin | while IFS= read -r line; do
sha="$(echo "$line" | awk '{print $1}')"
title="$(echo "$line" | cut -f 1 -d ' ' --complement)"
printf " … $title\r "
@ -64,14 +50,6 @@ fi
fi
echo "✔"
done
echo "All commits passed, now applying updates..."
if git rev-parse HEAD >/dev/null 2>&1; then
git rebase "${ref}"
else
git checkout -f "${ref}"
fi
git submodule update --init
if file_changed "${HOME}/bin/update-profile" "home/bin/update-profile"; then
# Use new profile update script instead
@ -83,6 +61,10 @@ fi
fi
fi
echo "All commits passed, now applying updates..."
git rebase origin
git submodule update --init
echo "Running package installation..."
cd packages
./packages.sh