Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
hvk-rebase.sh \
hvk-save-defconfig.sh \
hvk-select.sh \
+ hvk-stack \
hvk-x86.sh \
iso8859-to-utf8.sh \
kernel-send-patches.sh \
--- /dev/null
+#!/bin/bash
+
+set -e
+
+SCRIPT="`readlink -e $0`"
+SCRIPTPATH=$(dirname ${SCRIPT})
+
+if [ ${#} -lt 1 -o ${#} -gt 2 ]; then
+ echo "Invalid number of arguments (1 or 2)"
+ exit 1
+fi
+
+if [ ${#} -eq 2 ]; then
+ branch_base="${1}"
+ branch_to_rebase="${2}"
+elif [ ${#} -eq 1 ]; then
+ branch_base="$(git branch --show-current)"
+ branch_to_rebase="${1}"
+fi
+
+git checkout "${branch_to_rebase}"
+git rebase ${branch_base}