openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ksch...@apache.org
Subject svn commit: r1835779 - /openoffice/devtools/scripts/auto-index.sh
Date Thu, 12 Jul 2018 22:13:38 GMT
Author: kschenk
Date: Thu Jul 12 22:13:38 2018
New Revision: 1835779

URL: http://svn.apache.org/viewvc?rev=1835779&view=rev
Log:
Index script revision which supplies directory name for title if not supplied.


Modified:
    openoffice/devtools/scripts/auto-index.sh

Modified: openoffice/devtools/scripts/auto-index.sh
URL: http://svn.apache.org/viewvc/openoffice/devtools/scripts/auto-index.sh?rev=1835779&r1=1835778&r2=1835779&view=diff
==============================================================================
--- openoffice/devtools/scripts/auto-index.sh (original)
+++ openoffice/devtools/scripts/auto-index.sh Thu Jul 12 22:13:38 2018
@@ -6,17 +6,23 @@
 # usage: auto-index [dir] [filetype] [title]
 if [ $# -eq 0 ]; then
 	echo "Parameters: [directory to process] [filetypes to process] [title for index page]"
-	echo "[directory to process] is mandatory"
+	echo "[directory to process] MANDATORY"
 	echo "No parameters given: using current directory with html files and default title"
 fi
 FILETYPE="html"
-TITLE=$1
-if [ $2 ]; then FILETYPE = $2;  fi
-if [ $3 ]; then TITLE = $3;  fi
+TITLE=""
+if [ "$2" != ""  ]; then FILETYPE = $2;  fi
+if [ "$3" != "" ]; then
+	TITLE= $3
+else 
+	TITLE=$(basename $1)
+fi
 
 cd $1
 echo "Now in " $1 
+echo "Title: "$TITLE
 read -p "OK?..."
+exit
 
 rm -f index.html
 



Mime
View raw message