summaryrefslogtreecommitdiff
path: root/setup.rc
diff options
context:
space:
mode:
Diffstat (limited to 'setup.rc')
-rwxr-xr-xsetup.rc12
1 files changed, 8 insertions, 4 deletions
diff --git a/setup.rc b/setup.rc
index 9f1986cf..2c28e049 100755
--- a/setup.rc
+++ b/setup.rc
@@ -1,9 +1,5 @@
#!/bin/rc
-. ./config.rc
-
-flag e +
-
fn usage {
echo 'usage: '$0' [dir]' >[1=2]
exit 2
@@ -11,6 +7,12 @@ fn usage {
if(! ~ $#* 0 1) usage
+if(! [ -f config.rc ])
+ cp config.def.rc config.rc
+. ./config.rc
+
+flag e +
+
# call this after a command capture to ensure it succeeded
fn checkstatus {}
@@ -29,6 +31,8 @@ fn subgen {
}
fn gen {
+ pkg=`{basename $1}
+ checkstatus
if(~ $dir '' .) dir=$1
if not dir=$dir/$1