mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-22 22:20:39 +01:00
cvs-admin.sh: Add cvs-admin.sh
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
4db8ba0e71
commit
c8a1914788
1 changed files with 42 additions and 0 deletions
42
scripts/cvs-admin.sh
Normal file
42
scripts/cvs-admin.sh
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
log()
|
||||||
|
{
|
||||||
|
echo $@
|
||||||
|
}
|
||||||
|
|
||||||
|
err()
|
||||||
|
{
|
||||||
|
echo $@ >&2
|
||||||
|
}
|
||||||
|
|
||||||
|
fatal()
|
||||||
|
{
|
||||||
|
err $@
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd_list_projects()
|
||||||
|
{
|
||||||
|
local all_proj proj p
|
||||||
|
(
|
||||||
|
cd $projroot || fatal Failed to change to $projroot
|
||||||
|
all_proj=`find . -maxdepth 1 -mindepth 1 -type d`
|
||||||
|
for p in $all_proj; do
|
||||||
|
test -x $p || continue
|
||||||
|
test -r $p || continue
|
||||||
|
p=${p##./}
|
||||||
|
proj="$proj $p"
|
||||||
|
done
|
||||||
|
[ "$proj" ] && echo $proj
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
# ---------- here we go
|
||||||
|
|
||||||
|
cvsroot=/home/jannet/arc/cvs
|
||||||
|
projroot=$cvsroot/proj
|
||||||
|
cmd=${1/-/_}
|
||||||
|
shift
|
||||||
|
eval cmd_$cmd $@
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue