#! /bin/bash #---------------------------------------------------------------------------- # set-property.sh - set a property of the given file on the svn repository # # Creation : 2008-03-08 starwarsfan # Last Update: $Id: set-property.sh 990 2008-03-08 21:21:32Z starwarsfan $ # # Copyright (c) 2001-2009 the eisfair team, team(at)eisfair(dot)org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- # --------------------------------------------------------------------------- # setProperty () # Add the given file to svn:ignore # --------------------------------------------------------------------------- setProperty () { fileToPropSet=$1 svn propget svn:ignore > /tmp/actual-properties-$$ # -------------------------------------------------------- # Check if the given file is already existing on prop-list if grep "^${fileToPropSet}$" /tmp/actual-properties-$$ > /dev/null then myecho "Property for file '${fileToPropSet}' is already set, nothing to do." else echo ${fileToPropSet} > /tmp/new-properties-$$ cat /tmp/actual-properties-$$ >> /tmp/new-properties-$$ svn -q propset svn:ignore -F /tmp/new-properties-$$ . fi rm -f /tmp/*-properties-$$ }