Change info to version number, echo to stderr

This commit is contained in:
Jeremy Soller 2017-03-27 21:22:46 -06:00
parent f2f5487313
commit 9930e92fc7
2 changed files with 7 additions and 7 deletions

10
cook.sh
View File

@ -15,7 +15,7 @@ export CARGOFLAGS=
set -e
function op {
echo -e "\033[01;38;5;215mcook - $1 $2\033[0m"
echo -e "\033[01;38;5;215mcook - $1 $2\033[0m" >&2
case "$2" in
dist)
op $1 fetch
@ -44,16 +44,16 @@ function op {
unfetch)
rm -rfv build
;;
info)
version)
pushd build > /dev/null
skip="0"
if [ "$(type -t recipe_info)" = "function" ]
if [ "$(type -t recipe_version)" = "function" ]
then
recipe_info || skip="1"
recipe_version || skip="1"
fi
if [ "$skip" -eq "0" ]
then
echo "$1_$(cargo config package.version | tr -d '"')"
cargo config package.version | tr -d '"'
fi
popd > /dev/null
;;

View File

@ -1,7 +1,7 @@
GIT=https://github.com/redox-os/orbdata.git
function recipe_info {
echo "orbdata_0.0.1"
function recipe_version {
echo "0.0.1"
return 1
}