X-Git-Url: https://ruderich.org/simon/gitweb/?p=config%2Fdotfiles.git;a=blobdiff_plain;f=lib.sh;h=31b56c066db9596df61488efd4e7a48a6c8cbeae;hp=582e1cffe66b1f440dcec0744c08f336fffeb8ea;hb=84f932c810dae9ba0dd948e3a90c2f90d1f4e24a;hpb=5a511574188e52137e66a73d1562ad0a1eac8067 diff --git a/lib.sh b/lib.sh index 582e1cf..31b56c0 100644 --- a/lib.sh +++ b/lib.sh @@ -11,6 +11,12 @@ unset LS_COLORS m4=`which m4` +# Check if the given program is installed. Returns 0 if it exists, 1 +# otherwise; so it can be used in if. +installed() { + which $1 > /dev/null +} + # Creates a symbolic link for file $1 in dirname of $2 with name of basenmae # $2. #