split out /opt/pvl-dns/lib and /opt/pvl-verkko/bin default tip
authorterom
Sat, 26 Apr 2014 23:55:18 +0300
changeset 100 44c32fd60997
parent 99 934aab83b769
split out /opt/pvl-dns/lib and /opt/pvl-verkko/bin
bin/update
lib/update
update
--- a/bin/update	Sun Dec 22 18:22:37 2013 +0200
+++ b/bin/update	Sat Apr 26 23:55:18 2014 +0300
@@ -4,14 +4,16 @@
 # Bootstrap
 if [ $0 == './update' ]; then
     SRV=$(pwd)
-    OPT=./opt
+    OPT=/opt/pvl-verkko
+    LIB=/opt/pvl-dns/lib
 else
-    SRV=${SRV:-/srv/dns}
-    OPT=${SRV:-/srv/dns/opt}
+    SRV=${SRV:-/srv/verkko}
+    OPT=${SRV:-/opt/pvl-verkko}
+    LIB=/opt/pvl-dns/lib
     cd $SRV
 fi
 
-source lib/update
+source $LIB/update
 
 function commit {
     ## Commit
@@ -103,7 +105,7 @@
     parse_args "$@"
 
     ## Input dirs
-    for dir in etc etc/zones etc/hosts opt; do
+    for dir in etc etc/zones etc/hosts; do
         [ -d $dir ] || die "Missing directory: $dir"
     done
     
--- a/lib/update	Sun Dec 22 18:22:37 2013 +0200
+++ b/lib/update	Sat Apr 26 23:55:18 2014 +0300
@@ -7,7 +7,7 @@
 shopt -s globstar nullglob
 
 ## Library includes
-for lib in lib/update.*; do
+for lib in $LIB/update.*; do
     source $lib
 done
 
--- a/update	Sun Dec 22 18:22:37 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-bin/update
\ No newline at end of file