mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
scm.sh: Add scm.sh
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
bac93b0a82
commit
88a4ed98f1
1 changed files with 34 additions and 0 deletions
34
scripts/scm.sh
Normal file
34
scripts/scm.sh
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
#!/bin/bash
|
||||
|
||||
cmd_mv()
|
||||
{
|
||||
local from="$1"
|
||||
local to="$2"
|
||||
case $scm in
|
||||
cvs)
|
||||
cp "$from" "$to"
|
||||
cvs add "$to"
|
||||
cvs remove -f "$from"
|
||||
;;
|
||||
git)
|
||||
git mv "$from" "$to"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
cmd_commit()
|
||||
{
|
||||
$scm commit "$@"
|
||||
}
|
||||
|
||||
# ------- here we go
|
||||
myname=`basename $0`
|
||||
cmd=$1
|
||||
shift
|
||||
if [ -d "CVS" ]; then
|
||||
scm=cvs
|
||||
else
|
||||
scm=git
|
||||
fi
|
||||
|
||||
eval cmd_$cmd "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue