aboutsummaryrefslogtreecommitdiffstats
path: root/modules/buildsystem
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2014-09-15 19:42:43 +0100
committerColin Guthrie <colin@mageia.org>2014-09-19 09:58:25 +0100
commit844d375887333f5ac14c36fef37b5598535c2de5 (patch)
tree678c0d33471d182d5361f6e1abfb5b3b4b8e49a6 /modules/buildsystem
parentcc302084ccf54fb8f067f8dd5d7f7c07ed50b019 (diff)
downloadpuppet-844d375887333f5ac14c36fef37b5598535c2de5.tar
puppet-844d375887333f5ac14c36fef37b5598535c2de5.tar.gz
puppet-844d375887333f5ac14c36fef37b5598535c2de5.tar.bz2
puppet-844d375887333f5ac14c36fef37b5598535c2de5.tar.xz
puppet-844d375887333f5ac14c36fef37b5598535c2de5.zip
buildsystem: maintdb tabs->spaces
Diffstat (limited to 'modules/buildsystem')
-rwxr-xr-xmodules/buildsystem/templates/maintdb/maintdb.bin65
1 files changed, 32 insertions, 33 deletions
diff --git a/modules/buildsystem/templates/maintdb/maintdb.bin b/modules/buildsystem/templates/maintdb/maintdb.bin
index eb18ffef..9fef3c64 100755
--- a/modules/buildsystem/templates/maintdb/maintdb.bin
+++ b/modules/buildsystem/templates/maintdb/maintdb.bin
@@ -5,11 +5,11 @@ MAINTDBDIR="<%= scope.lookupvar('buildsystem::var::maintdb::dbdir') %>"
function checkname()
{
if [ -z "$1" ] ||
- echo "$1" | grep -q '[/*{}%]' ||
- echo "$1" | fgrep -q '..'
+ echo "$1" | grep -q '[/*{}%]' ||
+ echo "$1" | fgrep -q '..'
then
- echo "Error: invalid package name." >&2
- exit 1
+ echo "Error: invalid package name." >&2
+ exit 1
fi
}
@@ -17,14 +17,14 @@ function maintnew()
{
if [ a"$user" != "aroot" ]
then
- echo "Error: new is only allowed to root." >&2
- exit 1
+ echo "Error: new is only allowed to root." >&2
+ exit 1
fi
checkname "$1"
maintfile="$MAINTDBDIR/$1"
if [ -f "$maintfile" ]
then
- exit 0
+ exit 0
fi
echo "$2" > "$maintfile"
}
@@ -36,33 +36,33 @@ function maintset()
newmaint="$2"
if ! [ -f "$maintfile" ]
then
- echo "Error: package $1 does not exist in maintdb." >&2
- exit 1
+ echo "Error: package $1 does not exist in maintdb." >&2
+ exit 1
fi
curmaint=$(cat "$maintfile")
if [ a"$newmaint" = "anobody" ]
then
- if [ a"$curmaint" = a"$user" ]
- then
- echo "$newmaint" > "$maintfile"
- exit 0
- else
- echo "Error: cannot set maintainer for $1." >&2
- exit 1
- fi
+ if [ a"$curmaint" = a"$user" ]
+ then
+ echo "$newmaint" > "$maintfile"
+ exit 0
+ else
+ echo "Error: cannot set maintainer for $1." >&2
+ exit 1
+ fi
elif [ a"$newmaint" = a"$user" ]
then
- if [ a"$curmaint" = "anobody" ]
- then
- echo "$newmaint" > "$maintfile"
- exit 0
- else
- echo "Error: cannot set maintainer for $1." >&2
- exit 1
- fi
+ if [ a"$curmaint" = "anobody" ]
+ then
+ echo "$newmaint" > "$maintfile"
+ exit 0
+ else
+ echo "Error: cannot set maintainer for $1." >&2
+ exit 1
+ fi
else
- echo "Error: cannot set someone else as maintainer." >&2
- exit 1
+ echo "Error: cannot set someone else as maintainer." >&2
+ exit 1
fi
}
@@ -71,7 +71,7 @@ function maintgetall()
cd "$MAINTDBDIR"
for file in *
do
- echo "$file $(cat $file)"
+ echo "$file $(cat $file)"
done
exit 0
}
@@ -80,16 +80,16 @@ function maintget()
{
if [ -z "$1" ]
then
- maintgetall
+ maintgetall
fi
checkname "$1"
maintfile="$MAINTDBDIR/$1"
if [ -f "$maintfile" ]
then
- cat "$maintfile"
+ cat "$maintfile"
else
- echo "Error: package $1 does not exist in maintdb." >&2
- exit 1
+ echo "Error: package $1 does not exist in maintdb." >&2
+ exit 1
fi
}
@@ -109,4 +109,3 @@ else
echo "Error: unknow command." >&2
exit 2
fi
-