]> granicus.if.org Git - multimarkdown/commitdiff
UPDATED: Change convenience scripts for better POSIX compliance (implements #150...
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Sat, 8 Sep 2018 21:18:40 +0000 (17:18 -0400)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Sat, 8 Sep 2018 21:18:40 +0000 (17:18 -0400)
scripts/markdown
scripts/mmd
scripts/mmd2all
scripts/mmd2epub
scripts/mmd2fodt
scripts/mmd2odt
scripts/mmd2opml
scripts/mmd2pdf
scripts/mmd2tex

index 19a0d3973836a7afe8127511e9bd1bafe726deac..f48634c33a54d8b44fa1769a202b4f880f8213f8 100755 (executable)
@@ -20,8 +20,7 @@ done
 PATH="$DIR:/usr/local/bin:$PATH"
 export PATH
 
-which multimarkdown > /dev/null
-if [ $? = 1 ]
+if ! command -v multimarkdown >/dev/null 2>&1
 then
        echo multimarkdown executable not found! >&2
        exit 1
index a1a6aa7a1003ce93e2b385964b220964a0f04518..52db08c2b61c44e274d8b5a16a65c14acf74cbad 100755 (executable)
@@ -20,8 +20,7 @@ done
 PATH="$DIR:/usr/local/bin:$PATH"
 export PATH
 
-which multimarkdown > /dev/null
-if [ $? = 1 ]
+if ! command -v multimarkdown >/dev/null 2>&1
 then
        echo multimarkdown executable not found! >&2
        exit 1
index 0c12310b9486af8150d689cfa3a1f3e1693352ba..f0e824bb0ef1cf88ebc9d76118d43ab3c37a66ca 100755 (executable)
@@ -21,8 +21,7 @@ done
 PATH="$DIR:/usr/local/bin:$PATH"
 export PATH
 
-which multimarkdown > /dev/null
-if [ $? = 1 ]
+if ! command -v multimarkdown >/dev/null 2>&1
 then
        echo multimarkdown executable not found! >&2
        exit 1
index 7643541d4f4d0b1eea655b18d1161dc58fb315cb..8482901192d33a234bc8f483ce06b6f1c2d4f602 100755 (executable)
@@ -20,8 +20,7 @@ done
 PATH="$DIR:/usr/local/bin:$PATH"
 export PATH
 
-which multimarkdown > /dev/null
-if [ $? = 1 ]
+if ! command -v multimarkdown >/dev/null 2>&1
 then
        echo multimarkdown executable not found! >&2
        exit 1
index 745755bc1ef1e5e7ff09570e977335d53ebb15ec..4ef4264e0df1de890c4f19b7754b3888edcac47c 100755 (executable)
@@ -20,8 +20,7 @@ done
 PATH="$DIR:/usr/local/bin:$PATH"
 export PATH
 
-which multimarkdown > /dev/null
-if [ $? = 1 ]
+if ! command -v multimarkdown >/dev/null 2>&1
 then
        echo multimarkdown executable not found! >&2
        exit 1
index f8985c6770e2c18cbb39680d69fbecab7622f14c..b9c16bab0ab27d57e451d73940ab57bb0be5a08a 100755 (executable)
@@ -20,8 +20,7 @@ done
 PATH="$DIR:/usr/local/bin:$PATH"
 export PATH
 
-which multimarkdown > /dev/null
-if [ $? = 1 ]
+if ! command -v multimarkdown >/dev/null 2>&1
 then
        echo multimarkdown executable not found! >&2
        exit 1
index c4b9ed648a4bd5e16689a461e735562c287b563f..95f6ed768d60a1ac0e49385e6e1ad62a7bde3bd3 100755 (executable)
@@ -20,8 +20,7 @@ done
 PATH="$DIR:/usr/local/bin:$PATH"
 export PATH
 
-which multimarkdown > /dev/null
-if [ $? = 1 ]
+if ! command -v multimarkdown >/dev/null 2>&1
 then
        echo multimarkdown executable not found! >&2
        exit 1
index d8463a675564e308c075aeee1b36d6945e99fea5..21695e9199454e161a9bb85b355f2cb4c718144c 100755 (executable)
@@ -27,8 +27,7 @@ done
 PATH="$DIR:/usr/local/bin:/usr/texbin:/Library/TeX/texbin:$PATH"
 export PATH
 
-which multimarkdown > /dev/null
-if [ $? = 1 ]
+if ! command -v multimarkdown >/dev/null 2>&1
 then
        echo multimarkdown executable not found! >&2
        exit 1
index 317ba75c5c940ce858f9803e8cf59bba1e197f90..30c1d8b8a435ef346f31dea50c0f124afee47654 100755 (executable)
@@ -20,8 +20,7 @@ done
 PATH="$DIR:/usr/local/bin:$PATH"
 export PATH
 
-which multimarkdown > /dev/null
-if [ $? = 1 ]
+if ! command -v multimarkdown >/dev/null 2>&1
 then
        echo multimarkdown executable not found! >&2
        exit 1