From: Hugo Villeneuve Date: Mon, 6 Oct 2025 14:25:25 +0000 (-0400) Subject: hvk: add hvk-rebase.sh X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=9bdd835b9d8fc03f9597db6c303cb47ea16ebc67;p=hvutilities.git hvk: add hvk-rebase.sh Signed-off-by: Hugo Villeneuve --- diff --git a/scripts/Makefile.am b/scripts/Makefile.am index d8a9797..07ce625 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -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 index 0000000..2c9b14f --- /dev/null +++ b/scripts/hvk-rebase.sh @@ -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}