diff --git a/debian/tools/gitapply.sh b/debian/tools/gitapply.sh index 9d543c03..7a7bc7e2 100755 --- a/debian/tools/gitapply.sh +++ b/debian/tools/gitapply.sh @@ -1,6 +1,7 @@ #!/bin/bash # Setup parser variables +nogit=0 lineno=0 verbose=0 patch_mode=0 @@ -60,6 +61,10 @@ while [[ $# > 0 ]]; do verbose=1 ;; + --nogit) + nogit=1 + ;; + --help) usage exit 0 @@ -71,6 +76,12 @@ while [[ $# > 0 ]]; do esac done +# Redirect to git apply if available +if [ "$nogit" -eq 0 ] && command -v git >/dev/null 2>&1; then + exec git apply "$@" + exit 1 +fi + # Decode base85 git data, prepend with a gzip header awk_b85=' BEGIN{