summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/git/fetch.sh9
-rw-r--r--pkg/linux-headers/fetch.sh9
-rw-r--r--pkg/openbsd/fetch.sh11
3 files changed, 19 insertions, 10 deletions
diff --git a/pkg/git/fetch.sh b/pkg/git/fetch.sh
index 48edce2c..7e257f44 100644
--- a/pkg/git/fetch.sh
+++ b/pkg/git/fetch.sh
@@ -1,3 +1,6 @@
+: ${SHA256SUM:=sha256sum}
+: ${PAXREAD:=pax -r}
+
set -e
(. ./scripts/fetch-git.sh "$@")
@@ -9,10 +12,10 @@ if [ -e src/man ] ; then
rm -rf src/man
fi
-if ! sha256sum -c sha256 2>/dev/null ; then
+if ! $SHA256SUM -c sha256 2>/dev/null ; then
curl -L -O -K url
- sha256sum -c sha256
+ $SHA256SUM -c sha256
fi
read -r checksum archive <sha256
-xzcat "$archive" | ${PAXREAD:-pax -r} -s ',^\.,src/man,'
+xzcat "$archive" | $PAXREAD -s ',^\.,src/man,'
diff --git a/pkg/linux-headers/fetch.sh b/pkg/linux-headers/fetch.sh
index 0fdaa7f5..ad965403 100644
--- a/pkg/linux-headers/fetch.sh
+++ b/pkg/linux-headers/fetch.sh
@@ -1,3 +1,6 @@
+: ${SHA256SUM:=sha256sum}
+: ${PAXREAD:=pax -r}
+
set -e
dir=$1
@@ -9,14 +12,14 @@ if [ -e src ] ; then
rm -rf src
fi
-if ! sha256sum -c sha256 2>/dev/null ; then
+if ! $SHA256SUM -c sha256 2>/dev/null ; then
curl -L -K url -O
- sha256sum -c sha256
+ $SHA256SUM -c sha256
fi
read -r _ archive <sha256
-xzcat "$archive" | ${PAXREAD:-pax -r} -s ',^[^/]*,src,' \
+xzcat "$archive" | $PAXREAD -s ',^[^/]*,src,' \
'linux-*/Makefile' \
'linux-*/arch/*/include/uapi' \
'linux-*/arch/*/syscalls' \
diff --git a/pkg/openbsd/fetch.sh b/pkg/openbsd/fetch.sh
index 63e73d76..d45be54c 100644
--- a/pkg/openbsd/fetch.sh
+++ b/pkg/openbsd/fetch.sh
@@ -1,3 +1,6 @@
+: ${SHA256SUM:=sha256sum}
+: ${PAXREAD:=pax -r}
+
set -e
dir=$1
@@ -9,12 +12,12 @@ if [ -e src ] ; then
rm -rf src
fi
-if ! sha256sum -c sha256 2>/dev/null ; then
+if ! $SHA256SUM -c sha256 2>/dev/null ; then
curl -L -K url -O
- sha256sum -c sha256
+ $SHA256SUM -c sha256
fi
-zcat src.tar.gz | ${PAXREAD:-pax -r} -s ',^,src/,' \
+zcat src.tar.gz | $PAXREAD -s ',^,src/,' \
'bin/pax/*' \
'include/*' \
'lib/libc/*' \
@@ -29,6 +32,6 @@ zcat src.tar.gz | ${PAXREAD:-pax -r} -s ',^,src/,' \
'usr.bin/rsync/*' \
'usr.bin/yacc/*' \
'usr.sbin/acme-client/*'
-zcat sys.tar.gz | ${PAXREAD:-pax -r} -s ',^,src/,' 'sys/sys/*'
+zcat sys.tar.gz | $PAXREAD -s ',^,src/,' 'sys/sys/*'
git apply -v --whitespace=nowarn --directory "$dir/src" patch/*