Ich versuche, den Benutzernamen aus der Transaktion SVN Commit zu einem Repo zu bekommen.Speichern Ergebnis des SVN-Befehls in Variable
schrieb ich folgendes in der pre-commit hook
:
REPOS="$1"
TXN="$2"
touch /root/home/r/WC/log.log
AUTHOR="$(svnlook author -t $TXN $REPOS)"
echo $AUTHOR >> /root/home/r/WC/log.log
exit 0
Und das Ergebnis ist $(svnlook author -t 12-r /root/home/r/REPO)
Anscheinend sind die TXN und REPOS Variablen interpoliert wurden, aber die svnlook author
Befehl ausgeführt wurde nicht.
ich andere Möglichkeiten des Schreibens des Befehls, wie
AUTHOR=$(svnlook author -t $TVN $REPOS) # returned syntax error
AUTHOR=`svnlook author -t $TVN $REPOS` # did not execute the svnlook command
1,8 SVN Ich laufe auf Solaris