aboutsummaryrefslogtreecommitdiff
path: root/bin/ak-update
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-11-20 12:32:54 +0200
committerkaotisk <kaotisk@arching-kaos.org>2024-11-20 12:32:54 +0200
commit695c66d4ceb878b073d6a4eda3f2887e195add83 (patch)
treea53f2f0709077c84af324385080b846c62fb9467 /bin/ak-update
parent8a25a69ee253e4da0bc088d9d81818bd821e1b5c (diff)
downloadarching-kaos-tools-695c66d4ceb878b073d6a4eda3f2887e195add83.tar.gz
arching-kaos-tools-695c66d4ceb878b073d6a4eda3f2887e195add83.tar.bz2
arching-kaos-tools-695c66d4ceb878b073d6a4eda3f2887e195add83.zip
Updated update script to output what changed until the update you received
Diffstat (limited to 'bin/ak-update')
-rwxr-xr-xbin/ak-update13
1 files changed, 11 insertions, 2 deletions
diff --git a/bin/ak-update b/bin/ak-update
index dc040cb..95e7963 100755
--- a/bin/ak-update
+++ b/bin/ak-update
@@ -11,8 +11,17 @@ fi
if [ -d "${source_dir}" ] && [ -d "${source_dir}/.git" ]
then
cd ${source_dir}
- git pull
- ./update.sh
+ current_latest_commit="$(git -P log --oneline | head -n 1 | awk '{print $1}')"
+ pull_output="$(git pull)"
+ echo -n "${pull_output}" | grep "Already up to date." > /dev/null 2>&1
+ if [ $? -ne 0 ]
+ then
+ echo "${pull_output}"
+ ./update.sh
+ git -P log ${current_latest_commit}..HEAD
+ else
+ echo "${pull_output}"
+ fi
else
echo "Can't update... source not found or not a git repository"
exit 1