summaryrefslogtreecommitdiff
path: root/pkg/git
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2018-02-15 21:24:24 -0800
committerMichael Forney <mforney@mforney.org>2018-02-16 02:52:34 -0800
commit741d25282274e59c785b9cbee23cefff3d2721a2 (patch)
treeb7eaf7402cb1a61c220a3f0eecc3bc63cec14eaa /pkg/git
parent83d57181d1565d9c12b7d2467be9008d2b6edeab (diff)
Port build scripts to POSIX shell
Since we are now using Lua to generate ninja files, use of rc in build scripts seems unnecessary and adds an additional bootstrap dependency. None of them are too fancy, so just port to POSIX sh instead.
Diffstat (limited to 'pkg/git')
-rw-r--r--pkg/git/fetch.rc17
-rw-r--r--pkg/git/fetch.sh18
2 files changed, 18 insertions, 17 deletions
diff --git a/pkg/git/fetch.rc b/pkg/git/fetch.rc
deleted file mode 100644
index bec188d5..00000000
--- a/pkg/git/fetch.rc
+++ /dev/null
@@ -1,17 +0,0 @@
-flag e +
-
-@ . ./scripts/fetch-git.rc $*
-
-cd $1
-shift
-
-if([ -e src/man ])
- rm -rf src/man
-
-if(! sha256sum -c sha256 >[2]/dev/null) {
- curl -L -O -K url
- sha256sum -c sha256
-}
-
-archive=`{awk '{print $2}' sha256}
-xzcat $archive | pax -r -s ',^\.,src/man,'
diff --git a/pkg/git/fetch.sh b/pkg/git/fetch.sh
new file mode 100644
index 00000000..289daf1f
--- /dev/null
+++ b/pkg/git/fetch.sh
@@ -0,0 +1,18 @@
+set -e
+
+(. ./scripts/fetch-git.sh "$@")
+
+cd "$1"
+shift
+
+if [ -e src/man ] ; then
+ rm -rf src/man
+fi
+
+if ! sha256sum -c sha256 2>/dev/null ; then
+ curl -L -O -K url
+ sha256sum -c sha256
+fi
+
+read -r checksum archive <sha256
+xzcat "$archive" | pax -r -s ',^\.,src/man,'