sped-create: exist with error when git is required but cannot be found

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
Davide Madrisan 2012-04-23 21:00:46 +02:00
parent 1ccfb7faff
commit a360868bda
2 changed files with 6 additions and 0 deletions

View File

@ -15,6 +15,9 @@ Wed Apr 18 2012 Davide Madrisan <davide.madrisan(a)gmail.com>
* spec-create - Davide Madrisan: * spec-create - Davide Madrisan:
Also support git URL starting by http:// and https://. Also support git URL starting by http:// and https://.
* spec-create - Davide Madrisan:
Exist with error when git is required but cannot be found.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Changes in version 1.9.4 Changes in version 1.9.4

View File

@ -475,6 +475,9 @@ function specfile.create() {
case "$2" in case "$2" in
git://*|http://*.git|https://*.git) git://*|http://*.git|https://*.git)
which git &>/dev/null ||
notify.error $"utility not found"": \`git'"
tmpgitdir=$(mktemp -q -d -t tmpgit.XXXXXXXX) tmpgitdir=$(mktemp -q -d -t tmpgit.XXXXXXXX)
[ $? -eq 0 ] || [ $? -eq 0 ] ||
notify.error $"can't create temporary files" notify.error $"can't create temporary files"