From a808a05c2dbff0a7e33703a1597cee8dbe0f5c98 Mon Sep 17 00:00:00 2001 From: Matt Madia Date: Sat, 4 Dec 2010 20:01:00 +0000 Subject: [PATCH] Added a small utility script, to set the svn properties on html files. This should be run whenever changes are made to HAIKU_TOP docs. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39728 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/tools/propset-files.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/tools/propset-files.sh diff --git a/src/tools/propset-files.sh b/src/tools/propset-files.sh new file mode 100644 index 0000000000..eb9b9dfa4d --- /dev/null +++ b/src/tools/propset-files.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# A quick and dirty script, to help add the svn property to files. +# It is intended to be ran with a relative path from the desired directory. +# e.g., +# haiku/trunk/docs> sh ../src/tools/propset-files.sh + +tmpDir="`finddir B_COMMON_TEMP_DIRECTORY`" +tmpFile="${tmpDir}/propset-html" +find . -type d -name .svn -prune -o -print > "$tmpFile" + +while read file ; do + hasProperty=`svn propget svn:mime-type "$file"` + + if ! [ $hasProperty ] ; then + case "$file" in + *.html) + mimetype="text/html" + svn propset svn:mime-type "$mimetype" "$file" + ;; + #*.png) + # mimetype="image/png" + # #svn propset svn:mime-type "$mimetype" "$file" + # ;; + #*) + # echo $file + # ;; + esac + fi +done < "$tmpFile" + +rm "$tmpFile"