Skip to content
Snippets Groups Projects
Commit 576530b0 authored by Dennis Grabowski's avatar Dennis Grabowski
Browse files

fixup: feat(patching): initial scaffolding for the patching helper script

parent bfd8e0b4
Branches
No related tags found
No related merge requests found
#! /usr/bin/env bash
# This helper script is supposed to help maintaining our fork with various
# patches applied.
# Make sure the following problems rather error than just bug out:
# * always exit with non-zero return value on error
# * let pipefails exit with non-zero return value
# * let overwriting files exit with an error too
# * let usage of unset variables exit with non-zero return value
set -o errexit -o pipefail -o noclobber -o nounset
help() {
script_name=${0##*/}
echo "
$script_name
HsH patching helper script in ease maintaining H5P versions for which we want to apply a variety of patches.
Usage: $script_name command
Commands:
* init sets the original repo from GitHub as a remote (called upstream)
* fetch fetches all changes from upstream into the main branch
* apply-patches create a seperate HsH-themed branch from current version and applies all available patches for it
* pack packs the current version into a zip
* help prints this text.
Omitting the command will automatically invoke help.
"
exit 1
}
init() {
echo ""
}
fetch() {
echo ""
}
apply_patches() {
echo ""
}
pack() {
echo ""
}
case "$1" in
init)
init "$2"
;;
fetch)
fetch "$2"
;;
apply-patches)
apply_patches "$2"
;;
pack)
pack "$2"
;;
help|*)
help
;;
esac
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment