summaryrefslogtreecommitdiff
path: root/fetch.rc
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-06-27 20:30:15 -0700
committerMichael Forney <mforney@mforney.org>2016-06-27 20:30:15 -0700
commitf732e53f58b8f92132dece66b05f32576f830cc4 (patch)
treeb494541dae14382ed9865cda387c09e2c4d9db50 /fetch.rc
parent2b32697b70a7429c490b47723a9469fc14310ae9 (diff)
Integrate source fetching into ninja files
Diffstat (limited to 'fetch.rc')
-rwxr-xr-xfetch.rc117
1 files changed, 0 insertions, 117 deletions
diff --git a/fetch.rc b/fetch.rc
deleted file mode 100755
index 2d8278f8..00000000
--- a/fetch.rc
+++ /dev/null
@@ -1,117 +0,0 @@
-#!/bin/rc
-
-flag e +
-
-aflag=0
-if(~ $1 -a) aflag=1
-if not if(~ $#* 0) {
- echo 'usage: '$0' package...'
- echo ' '$0' -a'
-} >[1=2]
-
-packages=$*
-
-cd `{git rev-parse --show-toplevel}
-
-fn fetch-git {
- git submodule update --init --checkout src
- if([ -d patch ]) {
- patches=patch/*
- git -C src am ../$patches
- }
- status=()
-}
-
-fn fetch-curl {
- if([ -d src ]) rm -rf src
-
- if(! sha256sum -c sha256 >[2]/dev/null) {
- curl -L -O -K url
- sha256sum -c sha256
- }
-
- for(archive in `{awk '{print $2}' sha256}) {
- switch($archive) {
- case *.gz
- tool=zcat
- case *.bz2
- tool=bzcat
- case *.xz
- tool=xzcat
- case *
- tool=()
- }
- if(! ~ $#tool 0) $tool $archive | pax -r -s '/^\.\|[^\/]*/src/'
- }
-
- if([ -d patch ]) {
- if(prefix=`{git rev-parse --show-prefix >[2]/dev/null}) dir=$prefix^src
- if not dir=src
- git apply -v --directory $dir patch/*
- }
- status=()
-}
-
-fn fetch {
- if (~ $aflag 1 || ~ $1 $packages) @ {
- cd $1
- switch($2) {
- case git
- fetch-git
- case curl
- fetch-curl
- case *
- echo 'unknown fetch type: '$2
- }
- }
- status=()
-}
-
-fetch core/awk git
-fetch core/bc curl
-fetch core/bzip2 curl
-fetch core/curl git
-fetch core/e2fsprogs git
-fetch core/file git
-fetch core/git git
-fetch core/iproute2 git
-fetch core/kbd git
-fetch core/libressl git
-fetch core/loksh git
-fetch core/mdocml curl
-fetch core/ninja git
-fetch core/openbsd curl
-fetch core/openssh git
-fetch core/perp curl
-fetch core/pigz git
-fetch core/plan9port git
-fetch core/sbase git
-fetch core/sinit git
-fetch core/tz git
-fetch core/ubase git
-fetch core/xz git
-fetch core/zlib git
-fetch desktop/expat git
-fetch desktop/freetype git
-fetch desktop/libpciaccess git
-fetch desktop/libevdev git
-fetch desktop/libdrm git
-fetch desktop/libffi git
-fetch desktop/pixman git
-fetch desktop/plan9fonts git
-fetch desktop/wayland git
-fetch devel/cparser git
-fetch devel/libfirm git
-fetch devel/make git
-fetch devel/mc git
-fetch devel/qbe git
-fetch extra/hostap git
-fetch extra/libevent git
-fetch extra/libfuse git
-fetch extra/libnl git
-fetch extra/msmtp git
-fetch extra/pcre curl
-fetch extra/sshfs git
-fetch extra/the_silver_searcher git
-fetch extra/transmission curl
-fetch extra/unzip curl