[gimp-web/testing] Add a DownloadRoot variable to copy stuff to the downloads dirs



commit a5eccaee4e089b7d58866b18465e60042672b120
Author: Michael Schumacher <schumaml gmx de>
Date:   Wed Aug 20 00:12:35 2014 +0200

    Add a DownloadRoot variable to copy stuff to the downloads dirs

 install.config.sample           |    1 +
 install.sh                      |    5 +++--
 programmatic/downloads/Makefile |    6 +++---
 3 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/install.config.sample b/install.config.sample
index 0a21ce5..84e08b3 100644
--- a/install.config.sample
+++ b/install.config.sample
@@ -1,5 +1,6 @@
 # Where all HTML files and images will be installed:
 export HTDOCS_DIR=/home/wgo/htdocs
+export DOWNLOAD_DIR=/home/wgo/ftp
 
 # Uncomment the following line if you want to use a specific version of Python:
 #export PYTHON=/usr/bin/python
diff --git a/install.sh b/install.sh
index 6af4b3f..94a6e2b 100755
--- a/install.sh
+++ b/install.sh
@@ -39,8 +39,9 @@ if [ -z "${PYTHON}" ]; then
 fi
 
 #variable clean up
-#remove trailing slash from HTDOCS_DIR if it exists
+#remove trailing slash from HTDOCS_DIR and DOWNLOAD_DIR if it exists
 HTDOCS_DIR="${HTDOCS_DIR%/}"
+DOWNLOAD_DIR="${DOWNLOAD_DIR%/}"
 
 ######################################################################
 # functions
@@ -71,7 +72,7 @@ function preflight(){
 #main function is where all the magic happens.  Building the site
 function main(){
   STATUS=0
-  ${MAKE} PYTHON="${PYTHON}" DocumentRoot="${HTDOCS_DIR}" clean all programmatic install 2>&1 | tee 
"${MAKEOUT}"
+  ${MAKE} PYTHON="${PYTHON}" DocumentRoot="${HTDOCS_DIR}" DownloadRoot="${DOWNLOAD_DIR}" clean all 
programmatic install 2>&1 | tee "${MAKEOUT}"
   #capture the exit status of the make command
   if [ ! "${PIPESTATUS[0]}" -eq "0" ];then
     STATUS=1
diff --git a/programmatic/downloads/Makefile b/programmatic/downloads/Makefile
index a3b4c07..ee0efaf 100644
--- a/programmatic/downloads/Makefile
+++ b/programmatic/downloads/Makefile
@@ -19,6 +19,6 @@ install: mirrors.xhtml
        -mkdir -p `${PYTHON} -c 'import wgo_config; print wgo_config.DocumentRoot_path'`/downloads
        install -m 644 mirrors.xhtml `${PYTHON} -c 'import wgo_config; print 
wgo_config.DocumentRoot_path'`/downloads/mirrors.xhtml
 
-#install-ftp: MIRRORS
-#      -mkdir -p `${PYTHON} -c 'import wgo_config; print wgo_config.FtpRoot_path'`/gimp
-#      install -m 644 MIRRORS `${PYTHON} -c 'import wgo_config; print wgo_config.FtpRoot_path'`/gimp/MIRRORS
\ No newline at end of file
+install-download: MIRRORS
+       @if [ ${DownloadRoot}x != "x" ]; then mkdir -p `${PYTHON} -c 'import wgo_config; print 
wgo_config.DownloadRoot_path'`/gimp;
+       install -m 644 MIRRORS `${PYTHON} -c 'import wgo_config; print 
wgo_config.DownloadRoot_path'`/gimp/MIRRORS; fi;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]