From: Nathan Wagner Date: Tue, 17 Feb 2015 06:40:31 +0000 (+0000) Subject: fix add from file X-Git-Tag: v0.1.6~224 X-Git-Url: https://pd.if.org/git/?a=commitdiff_plain;ds=inline;h=bbe4a0596848ca6643a7a4a3bcd071b86ddb7b09;p=zpackage fix add from file --- diff --git a/Makefile b/Makefile index 248c071..8f84c9d 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,8 @@ install: install -D zpm $(DESTDIR)/bin/zpm install -D zpm-note $(DESTDIR)/bin/zpm-note install -D zpm-sequence $(DESTDIR)/bin/zpm-sequence - install -d -m2775 -o root -g adm $(DESTDIR)/var/lib/admin - install -d -m2775 -o root -g adm $(DESTDIR)/var/lib/admin/notes - install -d -m2775 -o root -g adm $(DESTDIR)/var/lib/admin/notes/open - install -d -m2775 -o root -g adm $(DESTDIR)/var/lib/admin/notes/ack + install -d -m2770 -o root -g adm $(DESTDIR)/var/lib/admin + install -d -m2770 -o root -g adm $(DESTDIR)/var/lib/admin/notes + install -d -m2770 -o root -g adm $(DESTDIR)/var/lib/admin/notes/open + install -d -m2770 -o root -g adm $(DESTDIR)/var/lib/admin/notes/ack #SPOOL=$(DESTDIR)/var/lib/admin/notes ./zpm-sequence -c notes diff --git a/zpm-note b/zpm-note index c036beb..be90e9b 100755 --- a/zpm-note +++ b/zpm-note @@ -17,7 +17,7 @@ set -e umask 007 -cd $SPOOL || { echo "can't chdir to $SPOOL" ; exit 1; } +#cd $SPOOL || { echo "can't chdir to $SPOOL" ; exit 1; } [ -z "$1" ] && set list @@ -80,6 +80,7 @@ case $cmd in ;; *) tmp=$(mktemp -p $SPOOL/open) + cp $1 $tmp flock -n -E3 $tmp vim $tmp if [ $? -eq 3 ]; then echo already editing $1; exit 1; fi file=$(zpm sequence notes)