mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-26 14:54:20 +08:00
Merge pull request #31 from ids1024/ca-certificates
ca-certificates package; needed by cargo
This commit is contained in:
commit
76506ee70d
54
cook.sh
54
cook.sh
@ -48,35 +48,43 @@ function op {
|
||||
op $1 unprepare
|
||||
;;
|
||||
fetch)
|
||||
if [ -n "$TAR" ]
|
||||
skip=0
|
||||
if [ "$(type -t recipe_fetch)" = "function" ]
|
||||
then
|
||||
if [ ! -f source.tar ]
|
||||
then
|
||||
wget "$TAR" -O source.tar
|
||||
fi
|
||||
|
||||
if [ ! -d source ]
|
||||
then
|
||||
mkdir source
|
||||
tar xvf source.tar -C source --strip-components 1
|
||||
fi
|
||||
elif [ -n "$GIT" ]
|
||||
recipe_fetch
|
||||
fi
|
||||
if [ "$skip" -eq "0" ]
|
||||
then
|
||||
if [ ! -d source ]
|
||||
if [ -n "$TAR" ]
|
||||
then
|
||||
if [ -n "$BRANCH" ]
|
||||
if [ ! -f source.tar ]
|
||||
then
|
||||
git clone --recursive "$GIT" -b "$BRANCH" source
|
||||
else
|
||||
git clone --recursive "$GIT" source
|
||||
wget "$TAR" -O source.tar
|
||||
fi
|
||||
fi
|
||||
|
||||
pushd source > /dev/null
|
||||
git pull
|
||||
git submodule sync
|
||||
git submodule update --init --recursive
|
||||
popd > /dev/null
|
||||
if [ ! -d source ]
|
||||
then
|
||||
mkdir source
|
||||
tar xvf source.tar -C source --strip-components 1
|
||||
fi
|
||||
elif [ -n "$GIT" ]
|
||||
then
|
||||
if [ ! -d source ]
|
||||
then
|
||||
if [ -n "$BRANCH" ]
|
||||
then
|
||||
git clone --recursive "$GIT" -b "$BRANCH" source
|
||||
else
|
||||
git clone --recursive "$GIT" source
|
||||
fi
|
||||
fi
|
||||
|
||||
pushd source > /dev/null
|
||||
git pull
|
||||
git submodule sync
|
||||
git submodule update --init --recursive
|
||||
popd > /dev/null
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
unfetch)
|
||||
|
||||
39
recipes/ca-certificates/recipe.sh
Normal file
39
recipes/ca-certificates/recipe.sh
Normal file
@ -0,0 +1,39 @@
|
||||
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
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user