Fix skipping method

This commit is contained in:
Jeremy Soller 2017-06-07 20:08:00 -06:00
parent bd219d2088
commit e87d8c0d93
9 changed files with 49 additions and 73 deletions

36
cook.sh
View File

@ -94,14 +94,10 @@ function op {
;;
version)
pushd build > /dev/null
skip="0"
skip=0
if [ "$(type -t recipe_version)" = "function" ]
then
recipe_version
if [ "$?" -ne "0" ]
then
skip="1"
fi
fi
if [ "$skip" -eq "0" ]
then
@ -119,14 +115,10 @@ function op {
;;
update)
pushd build > /dev/null
skip="0"
skip=0
if [ "$(type -t recipe_update)" = "function" ]
then
recipe_update
if [ "$?" -ne "0" ]
then
skip="1"
fi
fi
if [ "$skip" -eq "0" ]
then
@ -136,14 +128,10 @@ function op {
;;
build)
pushd build > /dev/null
skip="0"
skip=0
if [ "$(type -t recipe_build)" = "function" ]
then
recipe_build
if [ "$?" -ne "0" ]
then
skip="1"
fi
fi
if [ "$skip" -eq "0" ]
then
@ -154,14 +142,10 @@ function op {
;;
test)
pushd build > /dev/null
skip="0"
skip=0
if [ "$(type -t recipe_test)" = "function" ]
then
recipe_test
if [ "$?" -ne "0" ]
then
skip="1"
fi
fi
if [ "$skip" -eq "0" ]
then
@ -172,14 +156,10 @@ function op {
;;
clean)
pushd build > /dev/null
skip="0"
skip=0
if [ "$(type -t recipe_clean)" = "function" ]
then
recipe_clean
if [ "$?" -ne "0" ]
then
skip="1"
fi
fi
if [ "$skip" -eq "0" ]
then
@ -190,14 +170,10 @@ function op {
stage)
mkdir -p stage
pushd build > /dev/null
skip="0"
skip=0
if [ "$(type -t recipe_stage)" = "function" ]
then
recipe_stage ../stage
if [ "$?" -ne "0" ]
then
skip="1"
fi
fi
if [ "$skip" -eq "0" ]
then

View File

@ -16,33 +16,33 @@ export STRIP="${HOST}-strip"
function recipe_version {
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
return 1
skip=1
}
function recipe_update {
echo "skipping update"
return 1
skip=1
}
function recipe_build {
./autogen.sh
./configure --host=${HOST} --prefix=/
make
return 1
skip=1
}
function recipe_test {
echo "skipping test"
return 1
skip=1
}
function recipe_clean {
make clean
return 1
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
make DESTDIR="$dest" install
return 1
skip=1
}

View File

@ -3,7 +3,7 @@ CARGOFLAGS=--all
function recipe_version {
echo "0.1.1"
return 1
skip=1
}
function recipe_stage {

View File

@ -16,12 +16,12 @@ export STRIP="${HOST}-strip"
function recipe_version {
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
return 1
skip=1
}
function recipe_update {
echo "skipping update"
return 1
skip=1
}
function recipe_build {
@ -38,23 +38,23 @@ function recipe_build {
cd build
../configure --host=${HOST} --target=${HOST} --prefix=/ --enable-static --disable-shared --disable-dlopen --disable-nls --enable-languages=c --without-headers
make all-gcc all-target-libgcc
return 1
skip=1
}
function recipe_test {
echo "skipping test"
return 1
skip=1
}
function recipe_clean {
cd build
make clean
return 1
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
cd build
make DESTDIR="$dest" install-gcc install-target-libgcc
return 1
skip=1
}

View File

@ -15,12 +15,12 @@ export STRIP="${HOST}-strip"
function recipe_version {
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
return 1
skip=1
}
function recipe_update {
echo "skipping update"
return 1
skip=1
}
function recipe_build {
@ -28,23 +28,23 @@ function recipe_build {
cd build
../configure --host=${HOST} --target=${HOST} --prefix=/ --with-sysroot=/usr/x86_64-elf-redox --disable-gdb --disable-nls --disable-werror
make
return 1
skip=1
}
function recipe_test {
echo "skipping test"
return 1
skip=1
}
function recipe_clean {
cd build
make clean
return 1
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
cd build
make DESTDIR="$dest" install
return 1
skip=1
}

View File

@ -17,33 +17,33 @@ export STRIP="${HOST}-strip"
function recipe_version {
echo "$VERSION"
return 1
skip=1
}
function recipe_update {
echo "skipping update"
return 1
skip=1
}
function recipe_build {
patch -p1 < ../make.patch
./configure --host=${HOST} --prefix=/ CFLAGS=-DPOSIX --without-guile
make
return 1
skip=1
}
function recipe_test {
echo "skipping test"
return 1
skip=1
}
function recipe_clean {
make clean
return 1
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
make DESTDIR="$dest" install
return 1
skip=1
}

View File

@ -5,31 +5,31 @@ HOST=x86_64-elf-redox
function recipe_version {
echo "$VERSION"
return 1
skip=1
}
function recipe_update {
echo "skipping update"
return 1
skip=1
}
function recipe_build {
make generic CC="${HOST}-gcc -std=gnu99"
return 1
skip=1
}
function recipe_test {
echo "skipping test"
return 1
skip=1
}
function recipe_clean {
make clean
return 1
skip=1
}
function recipe_stage {
mkdir -pv "$1/bin"
cp src/lua src/luac "$1/bin"
return 1
skip=1
}

View File

@ -5,12 +5,12 @@ HOST=x86_64-elf-redox
function recipe_version {
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
return 1
skip=1
}
function recipe_update {
echo "skipping update"
return 1
skip=1
}
function recipe_build {
@ -29,17 +29,17 @@ function recipe_build {
CC= ./configure --target="${HOST}" --prefix=/
make all
return 1
skip=1
}
function recipe_test {
echo "skipping test"
return 1
skip=1
}
function recipe_clean {
make clean
return 1
skip=1
}
function recipe_stage {
@ -48,5 +48,5 @@ function recipe_stage {
cd "$dest"
mv x86_64-elf-redox/* ./
rmdir x86_64-elf-redox
return 1
skip=1
}

View File

@ -2,31 +2,31 @@ GIT=https://github.com/redox-os/orbdata.git
function recipe_version {
echo "0.0.1"
return 1
skip=1
}
function recipe_update {
echo "skipping update"
return 1
skip=1
}
function recipe_build {
echo "skipping build"
return 1
skip=1
}
function recipe_test {
echo "skipping test"
return 1
skip=1
}
function recipe_clean {
echo "skipping clean"
return 1
skip=1
}
function recipe_stage {
mkdir -pv "$1/ui"
cp -Rv ./* "$1/ui"
return 1
skip=1
}