ENGINE-221: use 'gpg' when 'gpg2' command line alias isn't available (i.e. on deb9) gnupg-2.1
authorEdouard Tisserant <edouard@pep-project.org>
Wed, 19 Jul 2017 18:37:01 +0200
branchgnupg-2.1
changeset 1929bad90979fd7e
parent 1927 635015dfafd5
child 1930 9c2d35bc8152
child 1931 3a52d0092cdc
ENGINE-221: use 'gpg' when 'gpg2' command line alias isn't available (i.e. on deb9)
test/Makefile
     1.1 --- a/test/Makefile	Sun Jul 16 20:50:00 2017 +0200
     1.2 +++ b/test/Makefile	Wed Jul 19 18:37:01 2017 +0200
     1.3 @@ -39,6 +39,12 @@
     1.4  TEST_HOME_SKEL=$(TEST_HOME)_skel
     1.5  TEST_GNUPGHOME_SKEL=$(TEST_HOME)_skel/.gnupg
     1.6  
     1.7 +ifeq ($(shell which gpg2), )
     1.8 +    GPG_CMD = gpg
     1.9 +else
    1.10 +    GPG_CMD = gpg2
    1.11 +endif
    1.12 +
    1.13  ifeq ($(shell uname), Darwin)
    1.14      LIBPATH = DYLD_LIBRARY_PATH
    1.15      LLDB_BIN = /Applications/Xcode.app/Contents/Developer/usr/bin/lldb
    1.16 @@ -52,7 +58,7 @@
    1.17  test_home_skel:
    1.18  	mkdir -p test_home_skel
    1.19  	mkdir -p $(TEST_GNUPGHOME_SKEL)/private-keys-v1.d
    1.20 -	gpg2 --import --batch --homedir $(TEST_GNUPGHOME_SKEL) 0x*.asc *_sec.asc
    1.21 +	$(GPG_CMD) --import --batch --homedir $(TEST_GNUPGHOME_SKEL) 0x*.asc *_sec.asc
    1.22  
    1.23  test_home_: test_home_skel
    1.24  	rm -rf test_home