Build manifest and signature into repo

This commit is contained in:
Jeremy Soller 2017-04-25 19:55:24 -06:00
parent fa389690bb
commit 207c3cb3c5
2 changed files with 11 additions and 6 deletions

2
.gitignore vendored
View File

@ -3,4 +3,6 @@ repo
source source
source.tar source.tar
stage stage
stage.sig
stage.tar stage.tar
stage.toml

15
cook.sh
View File

@ -195,21 +195,24 @@ function op {
rm -rfv stage rm -rfv stage
;; ;;
tar) tar)
mkdir -p stage/etc/pkg.d echo "name = \"$1\"" > "stage.toml"
echo "name = \"$1\"" > "stage/etc/pkg.d/$1.toml" echo "version = \"$(op $1 version)\"" >> "stage.toml"
echo "version = \"$(op $1 version)\"" >> "stage/etc/pkg.d/$1.toml" echo "target = \"$TARGET\"" >> "stage.toml"
echo "target = \"$TARGET\"" >> "stage/etc/pkg.d/$1.toml" mkdir -p stage/pkg
cp -v stage.toml "stage/pkg/$1.toml"
$ROOT/pkgutils/target/release/pkg create stage $ROOT/pkgutils/target/release/pkg create stage
;; ;;
untar) untar)
rm -rfv stage.tar stage.sig rm -rfv stage.tar stage.sig stage.toml
;; ;;
publish) publish)
mkdir -p "$REPO" mkdir -p "$REPO"
cp -v stage.tar "$REPO/$1.tar" cp -v stage.tar "$REPO/$1.tar"
cp -v stage.sig "$REPO/$1.sig"
cp -v stage.toml "$REPO/$1.toml"
;; ;;
unpublish) unpublish)
rm -rfv "$REPO/$1.tar" rm -rfv "$REPO/$1.tar" "$REPO/$1.sig" "$REPO/$1.toml"
;; ;;
*) *)
usage $1 usage $1