]> pd.if.org Git - zpackage/commitdiff
use new environment variables
authorNathan Wagner <nw@hydaspes.if.org>
Wed, 28 Sep 2016 23:21:44 +0000 (23:21 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Wed, 28 Sep 2016 23:23:29 +0000 (23:23 +0000)
zpm-addtopackage
zpm-newpackage

index 3833c00502a752bd76f013434b0f06609d6c4f61..f096ea2eaef6c6eb2c2b0a2ec20c8d2c2720e0f2 100755 (executable)
@@ -2,8 +2,8 @@
 
 package=${1:-$ZPMPACKAGE}
 shift
-pkgver=${ZPMPACKAGEVER:-1.0}
-pkgrel=${ZPMPACKAGEREL:-1}
+pkgver=${ZPMPKGVER:-1.0}
+pkgrel=${ZPMPKGREL:-1}
 
 # option for "multipackage" just to let the system know that's what you meant
 # option to take filenames from stdin
@@ -29,7 +29,7 @@ if [ -z "$pkgfile" ]; then
 fi
 
 if [ ! -f $pkgfile ]; then
-       ./zpm-newpackage $package || exit 1
+       zpm newpackage $package || exit 1
 else
        appid=$(sqlite3 $pkgfile 'pragma application_id;' | ( echo obase = 16; cat - ) | bc)
        if [ "$appid" != "5A504442" ]; then
@@ -64,7 +64,7 @@ for path in $*; do
 
        if [ -f "$path" ]; then
 
-               hash=$(./zpm-addfile $pkgfile $path)
+               hash=$(zpm addfile $pkgfile $path)
 
 #if [ -z "$hash" ]; then continue; fi
 
index fbd44b5afc41c298ff3273f42e87551ff6a17687..2b947015c47e60d852aedd432edb2d480fbe6ff4 100755 (executable)
@@ -1,8 +1,8 @@
 #!/bin/sh
 
 package=${1:-$ZPMPACKAGE}
-pkgver=${ZPMPACKAGEVER:-1.0}
-pkgrel=${ZPMPACKAGEREL:-1}
+pkgver=${ZPMPKGVER:-1.0}
+pkgrel=${ZPMPKGREL:-1}
 
 builddate=$(date '+%s')
 
@@ -20,14 +20,14 @@ while getopts :f:v:r:d:a:u:l:p:b: opt; do
        esac
 done
 
-set -e
-
 if [ -z "$pkgfile" ]; then
        pkgfile="$package-$pkgver-$pkgrel.zpm"
 fi
 
+set -e
+
 if [ ! -e $pkgfile ]; then
-       sqlite3 $pkgfile < db.sql
+       zpm init $pkgfile
 fi
 
 sqlite3 $pkgfile <<EOS