hvk: add hvk-rebase.sh
authorHugo Villeneuve <hugo@hugovil.com>
Mon, 6 Oct 2025 14:25:25 +0000 (10:25 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Mon, 15 Dec 2025 16:03:32 +0000 (11:03 -0500)
Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
scripts/Makefile.am
scripts/hvk-rebase.sh [new file with mode: 0755]

index d8a9797..07ce625 100644 (file)
@@ -27,6 +27,7 @@ dist_bin_SCRIPTS = \
     hvk-configure.sh \
     hvk-debug.sh \
     hvk-init.sh \
+    hvk-rebase.sh \
     hvk-save-defconfig.sh \
     hvk-dt.sh \
     hvk-select.sh \
diff --git a/scripts/hvk-rebase.sh b/scripts/hvk-rebase.sh
new file mode 100755 (executable)
index 0000000..2c9b14f
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+set -e
+
+SCRIPT="`readlink -e $0`"
+SCRIPTPATH=$(dirname ${SCRIPT})
+
+hvk_src=.hvk-rebase
+
+if [ ! -f ${hvk_src} ]; then
+    echo "Missing HVK rebase configuration file: ${hvk_src}"
+    exit 1
+fi
+
+if [ -f ${HOME}/.bash_aliases ]; then
+    source ~/.bash_aliases
+    shopt -s expand_aliases
+fi
+
+current_branch=$(git branch --show-current)
+
+source ${hvk_src}
+
+# Return to original branch:
+git checkout ${current_branch}