mirror of
https://github.com/thomas-krenn/check_lsi_raid.git
synced 2026-02-28 14:48:40 +01:00
- added rcs-keywords
- added empty check_lsi_raid
This commit is contained in:
13
.git_filters/rcs-keywords.clean
Normal file
13
.git_filters/rcs-keywords.clean
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/perl -p
|
||||
#
|
||||
# @brief Git filter to implement rcs keyword expansion as seen in cvs and svn.
|
||||
# @author Martin Turon
|
||||
#
|
||||
# Copyright (c) 2009-2011 Turon Technologies, Inc. All rights reserved.
|
||||
|
||||
s/\$Id[^\$]*\$/\$Id\$/;
|
||||
s/\$Date[^\$]*\$/\$Date\$/;
|
||||
s/\$Author[^\$]*\$/\$Author\$/;
|
||||
s/\$Source[^\$]*\$/\$Source\$/;
|
||||
s/\$File[^\$]*\$/\$File\$/;
|
||||
s/\$Revision[^\$]*\$/\$Revision\$/;
|
||||
49
.git_filters/rcs-keywords.smudge
Normal file
49
.git_filters/rcs-keywords.smudge
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# @brief Git filter to implement rcs keyword expansion as seen in cvs and svn.
|
||||
# @author Martin Turon
|
||||
#
|
||||
# Usage:
|
||||
# .git_filter/rcs-keywords.smudge file_path < file_contents
|
||||
#
|
||||
# To add keyword expansion:
|
||||
# <project>/.gitattributes - *.c filter=rcs-keywords
|
||||
# <project>/.git_filters/rcs-keywords.smudge - copy this file to project
|
||||
# <project>/.git_filters/rcs-keywords.clean - copy companion to project
|
||||
# ~/.gitconfig - add [filter] lines below
|
||||
#
|
||||
# [filter "rcs-keywords"]
|
||||
# clean = .git_filters/rcs-keywords.clean
|
||||
# smudge = .git_filters/rcs-keywords.smudge %f
|
||||
#
|
||||
# Copyright (c) 2009-2011 Turon Technologies, Inc. All rights reserved.
|
||||
|
||||
$path = shift;
|
||||
$path =~ /.*\/(.*)/;
|
||||
$filename = $1;
|
||||
|
||||
if (0 == length($filename)) {
|
||||
$filename = $path;
|
||||
}
|
||||
|
||||
# Need to grab filename and to use git log for this to be accurate.
|
||||
$rev = `git log -- $path | head -n 3`;
|
||||
$rev =~ /^Author:\s*(.*)\s*$/m;
|
||||
$author = $1;
|
||||
$author =~ /\s*(.*)\s*<.*/;
|
||||
$name = $1;
|
||||
$rev =~ /^Date:\s*(.*)\s*$/m;
|
||||
$date = $1;
|
||||
$rev =~ /^commit (.*)$/m;
|
||||
$ident = $1;
|
||||
|
||||
while (<STDIN>) {
|
||||
s/\$Date[^\$]*\$/\$Date: $date \$/;
|
||||
s/\$Author[^\$]*\$/\$Author: $author \$/;
|
||||
s/\$Id[^\$]*\$/\$Id: $filename | $date | $name \$/;
|
||||
s/\$File[^\$]*\$/\$File: $filename \$/;
|
||||
s/\$Source[^\$]*\$/\$Source: $path \$/;
|
||||
s/\$Revision[^\$]*\$/\$Revision: $ident \$/;
|
||||
} continue {
|
||||
print or die "-p destination: $!\n";
|
||||
}
|
||||
9
.gitattributes
vendored
Normal file
9
.gitattributes
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# .gitattributes
|
||||
# Map file extensions to git filters
|
||||
|
||||
*.h filter=rcs-keywords
|
||||
*.c filter=rcs-keywords
|
||||
*.cc filter=rcs-keywords
|
||||
*.m filter=rcs-keywords
|
||||
*.mm filter=rcs-keywords
|
||||
check_lsi_raid filter=rcs-keywords
|
||||
27
check_lsi_raid
Normal file
27
check_lsi_raid
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/perl -w
|
||||
# ======================================================================================
|
||||
# file: check_lsi_raid $Revision$ $Date$ $Author$
|
||||
# $Id$
|
||||
# --------------------------------------------------------------------------------------
|
||||
# Created as part of a semester project at the University of Applied Sciences Hagenberg
|
||||
# (http://www.fh-ooe.at/en/hagenberg-campus/)
|
||||
#
|
||||
# Copyright (c) 2013:
|
||||
# Grubhofer Martin (s1110239013@students.fh-hagenberg.at)
|
||||
# Scheipner Alexander (s1110239032@students.fh-hagenberg.at)
|
||||
# Werner Sebastian (s1110239038@students.fh-hagenberg.at)
|
||||
#
|
||||
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
# ======================================================================================
|
||||
Reference in New Issue
Block a user