From 0e71cb1d6acb1c54cf7fbedf56b33ba17b749b54 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Nov 07 2010 13:58:40 +0000 Subject: Use `Config' directory name to organize auxiliar files inside Html, and Shell specific functionalities. --- diff --git a/Scripts/Bash/Functions/Html/html_updateHeadings.sh b/Scripts/Bash/Functions/Html/html_updateHeadings.sh index 724612a..7da5331 100644 --- a/Scripts/Bash/Functions/Html/html_updateHeadings.sh +++ b/Scripts/Bash/Functions/Html/html_updateHeadings.sh @@ -135,7 +135,7 @@ function html_updateHeadings { for TOCENTRY in "${TOCENTRIES[@]}";do echo $TOCENTRY done \ - | awk -f /home/centos/artwork/trunk/Scripts/Bash/Functions/Html/Styles/output_forHeadingsToc.awk) + | awk -f /home/centos/artwork/trunk/Scripts/Bash/Functions/Html/Config/output_forHeadingsToc.awk) # Update table of contents inside the current file being # processed. diff --git a/Scripts/Bash/Functions/Shell/Config/gpl-copyright-al.sed b/Scripts/Bash/Functions/Shell/Config/gpl-copyright-al.sed new file mode 100644 index 0000000..b18b358 --- /dev/null +++ b/Scripts/Bash/Functions/Shell/Config/gpl-copyright-al.sed @@ -0,0 +1,38 @@ +# This file standardizes the look and feel of top comments used by +# scripts inside CentOS Artwork Repository. It contains the copyright +# note and the license under which the script is released. This files +# is used with the regular expression '.*\.sh$' only. +# --------------------------------------------------- +# $Id: svg-metadata-centos.sed 5962 2010-06-16 05:44:51Z al $ +# --------------------------------------------------- +/^# +Copyright .*$/a\ +# Copyright (C) 2009-=YEAR= Alain Reguera Delgado\ +# \ +# 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.\ +# \ +# This program is distributed in the hope that it will be useful, but\ +# WITHOUT ANY WARRANTY; without even the implied warranty of\ +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\ +# General Public License for more details.\ +#\ +# You should have received a copy of the GNU General Public License\ +# along with this program; if not, write to the Free Software\ +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307\ +# USA.\ +# \ +#------------------------------------------------------------ + +# Remove previous comments. +/^# +Copyright .*$/,/^#-+$/{ +d +} + +# Remove more than one space after comments. +s/^# +/# / + +# Define first line +1c\ +#!/bin/bash diff --git a/Scripts/Bash/Functions/Shell/Tpl/gpl-copyright-al.sed b/Scripts/Bash/Functions/Shell/Tpl/gpl-copyright-al.sed deleted file mode 100644 index b18b358..0000000 --- a/Scripts/Bash/Functions/Shell/Tpl/gpl-copyright-al.sed +++ /dev/null @@ -1,38 +0,0 @@ -# This file standardizes the look and feel of top comments used by -# scripts inside CentOS Artwork Repository. It contains the copyright -# note and the license under which the script is released. This files -# is used with the regular expression '.*\.sh$' only. -# --------------------------------------------------- -# $Id: svg-metadata-centos.sed 5962 2010-06-16 05:44:51Z al $ -# --------------------------------------------------- -/^# +Copyright .*$/a\ -# Copyright (C) 2009-=YEAR= Alain Reguera Delgado\ -# \ -# 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.\ -# \ -# This program is distributed in the hope that it will be useful, but\ -# WITHOUT ANY WARRANTY; without even the implied warranty of\ -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\ -# General Public License for more details.\ -#\ -# You should have received a copy of the GNU General Public License\ -# along with this program; if not, write to the Free Software\ -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307\ -# USA.\ -# \ -#------------------------------------------------------------ - -# Remove previous comments. -/^# +Copyright .*$/,/^#-+$/{ -d -} - -# Remove more than one space after comments. -s/^# +/# / - -# Define first line -1c\ -#!/bin/bash diff --git a/Scripts/Bash/Functions/Shell/shell.sh b/Scripts/Bash/Functions/Shell/shell.sh index 1338c09..a0d86c9 100755 --- a/Scripts/Bash/Functions/Shell/shell.sh +++ b/Scripts/Bash/Functions/Shell/shell.sh @@ -30,7 +30,7 @@ function shell { # Define list of files to process using option value as reference. if [[ -d $OPTIONVAL ]];then - FILES=$(find $OPTIONVAL -regextype posix-egrep -type f -regex '.*/*.shell$') + FILES=$(find $OPTIONVAL -regextype posix-egrep -type f -regex '.*/*.sh$') elif [[ -f $OPTIONVAL ]];then FILES=$OPTIONVAL fi diff --git a/Scripts/Bash/Functions/Shell/shell_updateTopComment.sh b/Scripts/Bash/Functions/Shell/shell_updateTopComment.sh index 5e55008..fab68ac 100755 --- a/Scripts/Bash/Functions/Shell/shell_updateTopComment.sh +++ b/Scripts/Bash/Functions/Shell/shell_updateTopComment.sh @@ -44,7 +44,7 @@ function shell_updateTopComment { local YEAR='' # Define absolute path to template files. - TEMPLATES=~/artwork/trunk/Scripts/Bash/Functions/Shell/Tpl + TEMPLATES=~/artwork/trunk/Scripts/Bash/Functions/Shell/Config # Define template file we want to apply. More than one template # file may exist, so let the user choose which one to use.