#!/bin/sh
# Install weechat — create command trampolines in ../bin/
dir=`dirname "$0"`
case "$dir" in
    /*) ;;
    *)  dir="`pwd`/$dir" ;;
esac
dir=`cd "$dir" && pwd`
bundle=`basename "$dir"`
bindir=`dirname "$dir"`/bin
mkdir -p "$bindir"
echo "Installing weechat commands into $bindir"
echo '#!/bin/sh' > "$bindir/CA.pl"
echo 'dir=`dirname "$0"`' >> "$bindir/CA.pl"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/CA.pl"
echo "exec \"\$dir/../$bundle/CA.pl\" \"\$@\"" >> "$bindir/CA.pl"
chmod 755 "$bindir/CA.pl" && echo "  CA.pl"
echo '#!/bin/sh' > "$bindir/asn1Coding"
echo 'dir=`dirname "$0"`' >> "$bindir/asn1Coding"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/asn1Coding"
echo "exec \"\$dir/../$bundle/asn1Coding\" \"\$@\"" >> "$bindir/asn1Coding"
chmod 755 "$bindir/asn1Coding" && echo "  asn1Coding"
echo '#!/bin/sh' > "$bindir/asn1Decoding"
echo 'dir=`dirname "$0"`' >> "$bindir/asn1Decoding"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/asn1Decoding"
echo "exec \"\$dir/../$bundle/asn1Decoding\" \"\$@\"" >> "$bindir/asn1Decoding"
chmod 755 "$bindir/asn1Decoding" && echo "  asn1Decoding"
echo '#!/bin/sh' > "$bindir/asn1Parser"
echo 'dir=`dirname "$0"`' >> "$bindir/asn1Parser"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/asn1Parser"
echo "exec \"\$dir/../$bundle/asn1Parser\" \"\$@\"" >> "$bindir/asn1Parser"
chmod 755 "$bindir/asn1Parser" && echo "  asn1Parser"
echo '#!/bin/sh' > "$bindir/c_rehash"
echo 'dir=`dirname "$0"`' >> "$bindir/c_rehash"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/c_rehash"
echo "exec \"\$dir/../$bundle/c_rehash\" \"\$@\"" >> "$bindir/c_rehash"
chmod 755 "$bindir/c_rehash" && echo "  c_rehash"
echo '#!/bin/sh' > "$bindir/captoinfo"
echo 'dir=`dirname "$0"`' >> "$bindir/captoinfo"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/captoinfo"
echo "exec \"\$dir/../$bundle/captoinfo\" \"\$@\"" >> "$bindir/captoinfo"
chmod 755 "$bindir/captoinfo" && echo "  captoinfo"
echo '#!/bin/sh' > "$bindir/certtool"
echo 'dir=`dirname "$0"`' >> "$bindir/certtool"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/certtool"
echo "exec \"\$dir/../$bundle/certtool\" \"\$@\"" >> "$bindir/certtool"
chmod 755 "$bindir/certtool" && echo "  certtool"
echo '#!/bin/sh' > "$bindir/clear"
echo 'dir=`dirname "$0"`' >> "$bindir/clear"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/clear"
echo "exec \"\$dir/../$bundle/clear\" \"\$@\"" >> "$bindir/clear"
chmod 755 "$bindir/clear" && echo "  clear"
echo '#!/bin/sh' > "$bindir/curl"
echo 'dir=`dirname "$0"`' >> "$bindir/curl"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/curl"
echo "exec \"\$dir/../$bundle/curl\" \"\$@\"" >> "$bindir/curl"
chmod 755 "$bindir/curl" && echo "  curl"
echo '#!/bin/sh' > "$bindir/envsubst"
echo 'dir=`dirname "$0"`' >> "$bindir/envsubst"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/envsubst"
echo "exec \"\$dir/../$bundle/envsubst\" \"\$@\"" >> "$bindir/envsubst"
chmod 755 "$bindir/envsubst" && echo "  envsubst"
echo '#!/bin/sh' > "$bindir/gettext"
echo 'dir=`dirname "$0"`' >> "$bindir/gettext"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/gettext"
echo "exec \"\$dir/../$bundle/gettext\" \"\$@\"" >> "$bindir/gettext"
chmod 755 "$bindir/gettext" && echo "  gettext"
echo '#!/bin/sh' > "$bindir/gettext.sh"
echo 'dir=`dirname "$0"`' >> "$bindir/gettext.sh"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/gettext.sh"
echo "exec \"\$dir/../$bundle/gettext.sh\" \"\$@\"" >> "$bindir/gettext.sh"
chmod 755 "$bindir/gettext.sh" && echo "  gettext.sh"
echo '#!/bin/sh' > "$bindir/gnutls-cli"
echo 'dir=`dirname "$0"`' >> "$bindir/gnutls-cli"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/gnutls-cli"
echo "exec \"\$dir/../$bundle/gnutls-cli\" \"\$@\"" >> "$bindir/gnutls-cli"
chmod 755 "$bindir/gnutls-cli" && echo "  gnutls-cli"
echo '#!/bin/sh' > "$bindir/gnutls-cli-debug"
echo 'dir=`dirname "$0"`' >> "$bindir/gnutls-cli-debug"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/gnutls-cli-debug"
echo "exec \"\$dir/../$bundle/gnutls-cli-debug\" \"\$@\"" >> "$bindir/gnutls-cli-debug"
chmod 755 "$bindir/gnutls-cli-debug" && echo "  gnutls-cli-debug"
echo '#!/bin/sh' > "$bindir/gnutls-serv"
echo 'dir=`dirname "$0"`' >> "$bindir/gnutls-serv"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/gnutls-serv"
echo "exec \"\$dir/../$bundle/gnutls-serv\" \"\$@\"" >> "$bindir/gnutls-serv"
chmod 755 "$bindir/gnutls-serv" && echo "  gnutls-serv"
echo '#!/bin/sh' > "$bindir/gpg-error"
echo 'dir=`dirname "$0"`' >> "$bindir/gpg-error"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/gpg-error"
echo "exec \"\$dir/../$bundle/gpg-error\" \"\$@\"" >> "$bindir/gpg-error"
chmod 755 "$bindir/gpg-error" && echo "  gpg-error"
echo '#!/bin/sh' > "$bindir/infocmp"
echo 'dir=`dirname "$0"`' >> "$bindir/infocmp"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/infocmp"
echo "exec \"\$dir/../$bundle/infocmp\" \"\$@\"" >> "$bindir/infocmp"
chmod 755 "$bindir/infocmp" && echo "  infocmp"
echo '#!/bin/sh' > "$bindir/infotocap"
echo 'dir=`dirname "$0"`' >> "$bindir/infotocap"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/infotocap"
echo "exec \"\$dir/../$bundle/infotocap\" \"\$@\"" >> "$bindir/infotocap"
chmod 755 "$bindir/infotocap" && echo "  infotocap"
echo '#!/bin/sh' > "$bindir/make-dummy-cert"
echo 'dir=`dirname "$0"`' >> "$bindir/make-dummy-cert"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/make-dummy-cert"
echo "exec \"\$dir/../$bundle/make-dummy-cert\" \"\$@\"" >> "$bindir/make-dummy-cert"
chmod 755 "$bindir/make-dummy-cert" && echo "  make-dummy-cert"
echo '#!/bin/sh' > "$bindir/msgattrib"
echo 'dir=`dirname "$0"`' >> "$bindir/msgattrib"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/msgattrib"
echo "exec \"\$dir/../$bundle/msgattrib\" \"\$@\"" >> "$bindir/msgattrib"
chmod 755 "$bindir/msgattrib" && echo "  msgattrib"
echo '#!/bin/sh' > "$bindir/msgcat"
echo 'dir=`dirname "$0"`' >> "$bindir/msgcat"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/msgcat"
echo "exec \"\$dir/../$bundle/msgcat\" \"\$@\"" >> "$bindir/msgcat"
chmod 755 "$bindir/msgcat" && echo "  msgcat"
echo '#!/bin/sh' > "$bindir/msgcmp"
echo 'dir=`dirname "$0"`' >> "$bindir/msgcmp"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/msgcmp"
echo "exec \"\$dir/../$bundle/msgcmp\" \"\$@\"" >> "$bindir/msgcmp"
chmod 755 "$bindir/msgcmp" && echo "  msgcmp"
echo '#!/bin/sh' > "$bindir/msgcomm"
echo 'dir=`dirname "$0"`' >> "$bindir/msgcomm"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/msgcomm"
echo "exec \"\$dir/../$bundle/msgcomm\" \"\$@\"" >> "$bindir/msgcomm"
chmod 755 "$bindir/msgcomm" && echo "  msgcomm"
echo '#!/bin/sh' > "$bindir/msgconv"
echo 'dir=`dirname "$0"`' >> "$bindir/msgconv"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/msgconv"
echo "exec \"\$dir/../$bundle/msgconv\" \"\$@\"" >> "$bindir/msgconv"
chmod 755 "$bindir/msgconv" && echo "  msgconv"
echo '#!/bin/sh' > "$bindir/msgen"
echo 'dir=`dirname "$0"`' >> "$bindir/msgen"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/msgen"
echo "exec \"\$dir/../$bundle/msgen\" \"\$@\"" >> "$bindir/msgen"
chmod 755 "$bindir/msgen" && echo "  msgen"
echo '#!/bin/sh' > "$bindir/msgexec"
echo 'dir=`dirname "$0"`' >> "$bindir/msgexec"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/msgexec"
echo "exec \"\$dir/../$bundle/msgexec\" \"\$@\"" >> "$bindir/msgexec"
chmod 755 "$bindir/msgexec" && echo "  msgexec"
echo '#!/bin/sh' > "$bindir/msgfilter"
echo 'dir=`dirname "$0"`' >> "$bindir/msgfilter"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/msgfilter"
echo "exec \"\$dir/../$bundle/msgfilter\" \"\$@\"" >> "$bindir/msgfilter"
chmod 755 "$bindir/msgfilter" && echo "  msgfilter"
echo '#!/bin/sh' > "$bindir/msgfmt"
echo 'dir=`dirname "$0"`' >> "$bindir/msgfmt"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/msgfmt"
echo "exec \"\$dir/../$bundle/msgfmt\" \"\$@\"" >> "$bindir/msgfmt"
chmod 755 "$bindir/msgfmt" && echo "  msgfmt"
echo '#!/bin/sh' > "$bindir/msggrep"
echo 'dir=`dirname "$0"`' >> "$bindir/msggrep"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/msggrep"
echo "exec \"\$dir/../$bundle/msggrep\" \"\$@\"" >> "$bindir/msggrep"
chmod 755 "$bindir/msggrep" && echo "  msggrep"
echo '#!/bin/sh' > "$bindir/msginit"
echo 'dir=`dirname "$0"`' >> "$bindir/msginit"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/msginit"
echo "exec \"\$dir/../$bundle/msginit\" \"\$@\"" >> "$bindir/msginit"
chmod 755 "$bindir/msginit" && echo "  msginit"
echo '#!/bin/sh' > "$bindir/msgmerge"
echo 'dir=`dirname "$0"`' >> "$bindir/msgmerge"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/msgmerge"
echo "exec \"\$dir/../$bundle/msgmerge\" \"\$@\"" >> "$bindir/msgmerge"
chmod 755 "$bindir/msgmerge" && echo "  msgmerge"
echo '#!/bin/sh' > "$bindir/msgunfmt"
echo 'dir=`dirname "$0"`' >> "$bindir/msgunfmt"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/msgunfmt"
echo "exec \"\$dir/../$bundle/msgunfmt\" \"\$@\"" >> "$bindir/msgunfmt"
chmod 755 "$bindir/msgunfmt" && echo "  msgunfmt"
echo '#!/bin/sh' > "$bindir/msguniq"
echo 'dir=`dirname "$0"`' >> "$bindir/msguniq"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/msguniq"
echo "exec \"\$dir/../$bundle/msguniq\" \"\$@\"" >> "$bindir/msguniq"
chmod 755 "$bindir/msguniq" && echo "  msguniq"
echo '#!/bin/sh' > "$bindir/ngettext"
echo 'dir=`dirname "$0"`' >> "$bindir/ngettext"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/ngettext"
echo "exec \"\$dir/../$bundle/ngettext\" \"\$@\"" >> "$bindir/ngettext"
chmod 755 "$bindir/ngettext" && echo "  ngettext"
echo '#!/bin/sh' > "$bindir/ocsptool"
echo 'dir=`dirname "$0"`' >> "$bindir/ocsptool"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/ocsptool"
echo "exec \"\$dir/../$bundle/ocsptool\" \"\$@\"" >> "$bindir/ocsptool"
chmod 755 "$bindir/ocsptool" && echo "  ocsptool"
echo '#!/bin/sh' > "$bindir/openssl"
echo 'dir=`dirname "$0"`' >> "$bindir/openssl"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/openssl"
echo "exec \"\$dir/../$bundle/openssl\" \"\$@\"" >> "$bindir/openssl"
chmod 755 "$bindir/openssl" && echo "  openssl"
echo '#!/bin/sh' > "$bindir/psktool"
echo 'dir=`dirname "$0"`' >> "$bindir/psktool"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/psktool"
echo "exec \"\$dir/../$bundle/psktool\" \"\$@\"" >> "$bindir/psktool"
chmod 755 "$bindir/psktool" && echo "  psktool"
echo '#!/bin/sh' > "$bindir/recode-sr-latin"
echo 'dir=`dirname "$0"`' >> "$bindir/recode-sr-latin"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/recode-sr-latin"
echo "exec \"\$dir/../$bundle/recode-sr-latin\" \"\$@\"" >> "$bindir/recode-sr-latin"
chmod 755 "$bindir/recode-sr-latin" && echo "  recode-sr-latin"
echo '#!/bin/sh' > "$bindir/renew-dummy-cert"
echo 'dir=`dirname "$0"`' >> "$bindir/renew-dummy-cert"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/renew-dummy-cert"
echo "exec \"\$dir/../$bundle/renew-dummy-cert\" \"\$@\"" >> "$bindir/renew-dummy-cert"
chmod 755 "$bindir/renew-dummy-cert" && echo "  renew-dummy-cert"
echo '#!/bin/sh' > "$bindir/reset"
echo 'dir=`dirname "$0"`' >> "$bindir/reset"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/reset"
echo "exec \"\$dir/../$bundle/reset\" \"\$@\"" >> "$bindir/reset"
chmod 755 "$bindir/reset" && echo "  reset"
echo '#!/bin/sh' > "$bindir/tabs"
echo 'dir=`dirname "$0"`' >> "$bindir/tabs"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/tabs"
echo "exec \"\$dir/../$bundle/tabs\" \"\$@\"" >> "$bindir/tabs"
chmod 755 "$bindir/tabs" && echo "  tabs"
echo '#!/bin/sh' > "$bindir/tic"
echo 'dir=`dirname "$0"`' >> "$bindir/tic"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/tic"
echo "exec \"\$dir/../$bundle/tic\" \"\$@\"" >> "$bindir/tic"
chmod 755 "$bindir/tic" && echo "  tic"
echo '#!/bin/sh' > "$bindir/toe"
echo 'dir=`dirname "$0"`' >> "$bindir/toe"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/toe"
echo "exec \"\$dir/../$bundle/toe\" \"\$@\"" >> "$bindir/toe"
chmod 755 "$bindir/toe" && echo "  toe"
echo '#!/bin/sh' > "$bindir/tput"
echo 'dir=`dirname "$0"`' >> "$bindir/tput"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/tput"
echo "exec \"\$dir/../$bundle/tput\" \"\$@\"" >> "$bindir/tput"
chmod 755 "$bindir/tput" && echo "  tput"
echo '#!/bin/sh' > "$bindir/tset"
echo 'dir=`dirname "$0"`' >> "$bindir/tset"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/tset"
echo "exec \"\$dir/../$bundle/tset\" \"\$@\"" >> "$bindir/tset"
chmod 755 "$bindir/tset" && echo "  tset"
echo '#!/bin/sh' > "$bindir/tsget"
echo 'dir=`dirname "$0"`' >> "$bindir/tsget"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/tsget"
echo "exec \"\$dir/../$bundle/tsget\" \"\$@\"" >> "$bindir/tsget"
chmod 755 "$bindir/tsget" && echo "  tsget"
echo '#!/bin/sh' > "$bindir/tsget.pl"
echo 'dir=`dirname "$0"`' >> "$bindir/tsget.pl"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/tsget.pl"
echo "exec \"\$dir/../$bundle/tsget.pl\" \"\$@\"" >> "$bindir/tsget.pl"
chmod 755 "$bindir/tsget.pl" && echo "  tsget.pl"
echo '#!/bin/sh' > "$bindir/unzstd"
echo 'dir=`dirname "$0"`' >> "$bindir/unzstd"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/unzstd"
echo "exec \"\$dir/../$bundle/unzstd\" \"\$@\"" >> "$bindir/unzstd"
chmod 755 "$bindir/unzstd" && echo "  unzstd"
echo '#!/bin/sh' > "$bindir/weechat"
echo 'dir=`dirname "$0"`' >> "$bindir/weechat"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/weechat"
echo "exec \"\$dir/../$bundle/weechat\" \"\$@\"" >> "$bindir/weechat"
chmod 755 "$bindir/weechat" && echo "  weechat"
echo '#!/bin/sh' > "$bindir/weechat-curses"
echo 'dir=`dirname "$0"`' >> "$bindir/weechat-curses"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/weechat-curses"
echo "exec \"\$dir/../$bundle/weechat-curses\" \"\$@\"" >> "$bindir/weechat-curses"
chmod 755 "$bindir/weechat-curses" && echo "  weechat-curses"
echo '#!/bin/sh' > "$bindir/xgettext"
echo 'dir=`dirname "$0"`' >> "$bindir/xgettext"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/xgettext"
echo "exec \"\$dir/../$bundle/xgettext\" \"\$@\"" >> "$bindir/xgettext"
chmod 755 "$bindir/xgettext" && echo "  xgettext"
echo '#!/bin/sh' > "$bindir/zstd"
echo 'dir=`dirname "$0"`' >> "$bindir/zstd"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/zstd"
echo "exec \"\$dir/../$bundle/zstd\" \"\$@\"" >> "$bindir/zstd"
chmod 755 "$bindir/zstd" && echo "  zstd"
echo '#!/bin/sh' > "$bindir/zstdcat"
echo 'dir=`dirname "$0"`' >> "$bindir/zstdcat"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/zstdcat"
echo "exec \"\$dir/../$bundle/zstdcat\" \"\$@\"" >> "$bindir/zstdcat"
chmod 755 "$bindir/zstdcat" && echo "  zstdcat"
echo '#!/bin/sh' > "$bindir/zstdgrep"
echo 'dir=`dirname "$0"`' >> "$bindir/zstdgrep"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/zstdgrep"
echo "exec \"\$dir/../$bundle/zstdgrep\" \"\$@\"" >> "$bindir/zstdgrep"
chmod 755 "$bindir/zstdgrep" && echo "  zstdgrep"
echo '#!/bin/sh' > "$bindir/zstdless"
echo 'dir=`dirname "$0"`' >> "$bindir/zstdless"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/zstdless"
echo "exec \"\$dir/../$bundle/zstdless\" \"\$@\"" >> "$bindir/zstdless"
chmod 755 "$bindir/zstdless" && echo "  zstdless"
echo '#!/bin/sh' > "$bindir/zstdmt"
echo 'dir=`dirname "$0"`' >> "$bindir/zstdmt"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/zstdmt"
echo "exec \"\$dir/../$bundle/zstdmt\" \"\$@\"" >> "$bindir/zstdmt"
chmod 755 "$bindir/zstdmt" && echo "  zstdmt"
echo ""
echo "Done. Make sure $bindir is in your PATH:"
echo "  PATH=$bindir:\$PATH; export PATH"
echo ""
echo "Add that line to ~/.profile to make it permanent."
