Skip to content
Snippets Groups Projects
Commit 76506ee7 authored by Jeremy Soller's avatar Jeremy Soller Committed by GitHub
Browse files

Merge pull request #31 from ids1024/ca-certificates

ca-certificates package; needed by cargo
parents 0bbc25db c9c2b864
No related branches found
No related tags found
No related merge requests found
...@@ -48,35 +48,43 @@ function op { ...@@ -48,35 +48,43 @@ function op {
op $1 unprepare op $1 unprepare
;; ;;
fetch) fetch)
if [ -n "$TAR" ] skip=0
if [ "$(type -t recipe_fetch)" = "function" ]
then
recipe_fetch
fi
if [ "$skip" -eq "0" ]
then then
if [ ! -f source.tar ] if [ -n "$TAR" ]
then then
wget "$TAR" -O source.tar if [ ! -f source.tar ]
fi then
wget "$TAR" -O source.tar
fi
if [ ! -d source ] if [ ! -d source ]
then then
mkdir source mkdir source
tar xvf source.tar -C source --strip-components 1 tar xvf source.tar -C source --strip-components 1
fi fi
elif [ -n "$GIT" ] elif [ -n "$GIT" ]
then
if [ ! -d source ]
then then
if [ -n "$BRANCH" ] if [ ! -d source ]
then then
git clone --recursive "$GIT" -b "$BRANCH" source if [ -n "$BRANCH" ]
else then
git clone --recursive "$GIT" source git clone --recursive "$GIT" -b "$BRANCH" source
else
git clone --recursive "$GIT" source
fi
fi fi
fi
pushd source > /dev/null pushd source > /dev/null
git pull git pull
git submodule sync git submodule sync
git submodule update --init --recursive git submodule update --init --recursive
popd > /dev/null popd > /dev/null
fi
fi fi
;; ;;
unfetch) unfetch)
......
function recipe_fetch {
mkdir source
pushd source
curl -o make-ca.sh http://anduin.linuxfromscratch.org/BLFS/other/make-ca.sh-20170514
curl -o certdata.txt http://anduin.linuxfromscratch.org/BLFS/other/certdata.txt
popd
skip=1
}
function recipe_update {
curl -o make-ca.sh --time-cond make-ca.sh http://anduin.linuxfromscratch.org/BLFS/other/make-ca.sh-20170514
curl -o certdata.txt --time-cond certdata.txt http://anduin.linuxfromscratch.org/BLFS/other/certdata.txt
skip=1
}
function recipe_build {
rm -rf build
mkdir build
chmod +x ./make-ca.sh
./make-ca.sh -D "$PWD/build"
skip=1
}
function recipe_test {
echo "skipping test"
skip=1
}
function recipe_clean {
rm -rf build
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
mkdir -p "$1/ssl"
cp -rL build/etc/ssl/certs "$1/ssl"
skip=1
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment