annotate tools/gen-bat-wrapper @ 4378:a3af3be14136

of-image: update image patch from image repo * src/of-image-1-fixes.patch: update patch
author John D
date Sun, 09 Apr 2017 16:38:37 -0400
parents 32a7bea19bb1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4253
32a7bea19bb1 msys-gzip: add .bat wrappers to shellscripts
John D
parents:
diff changeset
1 #!/usr/bin/env bash
32a7bea19bb1 msys-gzip: add .bat wrappers to shellscripts
John D
parents:
diff changeset
2
32a7bea19bb1 msys-gzip: add .bat wrappers to shellscripts
John D
parents:
diff changeset
3 prog=$1
32a7bea19bb1 msys-gzip: add .bat wrappers to shellscripts
John D
parents:
diff changeset
4
32a7bea19bb1 msys-gzip: add .bat wrappers to shellscripts
John D
parents:
diff changeset
5 if [ -z $prog ]; then
32a7bea19bb1 msys-gzip: add .bat wrappers to shellscripts
John D
parents:
diff changeset
6 echo "Missing program name" >&2
32a7bea19bb1 msys-gzip: add .bat wrappers to shellscripts
John D
parents:
diff changeset
7 exit 1
32a7bea19bb1 msys-gzip: add .bat wrappers to shellscripts
John D
parents:
diff changeset
8 fi
32a7bea19bb1 msys-gzip: add .bat wrappers to shellscripts
John D
parents:
diff changeset
9
32a7bea19bb1 msys-gzip: add .bat wrappers to shellscripts
John D
parents:
diff changeset
10 cat << EOF
32a7bea19bb1 msys-gzip: add .bat wrappers to shellscripts
John D
parents:
diff changeset
11 @echo off
32a7bea19bb1 msys-gzip: add .bat wrappers to shellscripts
John D
parents:
diff changeset
12 set BINPATH=%~dp0
32a7bea19bb1 msys-gzip: add .bat wrappers to shellscripts
John D
parents:
diff changeset
13 %BINPATH%bash -c '$prog %*'
32a7bea19bb1 msys-gzip: add .bat wrappers to shellscripts
John D
parents:
diff changeset
14 EOF