adding not supported message for git tools requiring extra config settings to work. exiting with exit status 1

svn path=/nixpkgs/trunk/; revision=12250
This commit is contained in:
Marc Weber 2008-07-03 12:51:23 +00:00
parent 033d8cd1f3
commit 18b30f54ce

View File

@ -30,6 +30,11 @@ stdenv.mkDerivation rec {
postInstall = postInstall =
'' ''
notSupported(){
echo -e "#\!/bin/sh\necho '`basename $1` not supported, $2'\nexit 1" > "$1"
chmod +x $1
}
# Install Emacs mode. # Install Emacs mode.
echo "installing Emacs mode..." echo "installing Emacs mode..."
ensureDir $out/share/emacs/site-lisp ensureDir $out/share/emacs/site-lisp
@ -46,9 +51,9 @@ stdenv.mkDerivation rec {
wrapProgram "$out/bin/git-svn" \ wrapProgram "$out/bin/git-svn" \
--set GITPERLLIB "$gitperllib" \ --set GITPERLLIB "$gitperllib" \
--prefix PATH : "${subversion}/bin" '' --prefix PATH : "${subversion}/bin" ''
else '' else '' # replace git-svn by notification script
echo "NOT installing \`git-svn' since \`svnSupport' is false." notSupported $out/bin/git-svn "reinstall with config git = { svnSupport = true } set"
rm $out/bin/git-svn '') '')
+ ''# Install man pages and Info manual + ''# Install man pages and Info manual
make PERL_PATH="${perl}/bin/perl" cmd-list.made install install-info \ make PERL_PATH="${perl}/bin/perl" cmd-list.made install install-info \
@ -62,7 +67,13 @@ stdenv.mkDerivation rec {
--set TK_LIBRARY "${tk}/lib/tk8.4" \ --set TK_LIBRARY "${tk}/lib/tk8.4" \
--prefix PATH : "${tk}/bin" --prefix PATH : "${tk}/bin"
done done
'' else "") '' else ''
# don not wrap Tcl/Tk, replace them by notification scripts
for prog in gitk git-gui git-citool
do
notSupported "$out/bin/$prog" "reinstall with config git = { guiSupport = true } set"
done
'')
+ ''# Wrap `git-clone' + ''# Wrap `git-clone'
wrapProgram $out/bin/git-clone \ wrapProgram $out/bin/git-clone \