#!/bin/sh
# Install bitlbee — 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 bitlbee commands into $bindir"
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/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/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/gapplication"
echo 'dir=`dirname "$0"`' >> "$bindir/gapplication"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/gapplication"
echo "exec \"\$dir/../$bundle/gapplication\" \"\$@\"" >> "$bindir/gapplication"
chmod 755 "$bindir/gapplication" && echo "  gapplication"
echo '#!/bin/sh' > "$bindir/gdbus"
echo 'dir=`dirname "$0"`' >> "$bindir/gdbus"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/gdbus"
echo "exec \"\$dir/../$bundle/gdbus\" \"\$@\"" >> "$bindir/gdbus"
chmod 755 "$bindir/gdbus" && echo "  gdbus"
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/gio"
echo 'dir=`dirname "$0"`' >> "$bindir/gio"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/gio"
echo "exec \"\$dir/../$bundle/gio\" \"\$@\"" >> "$bindir/gio"
chmod 755 "$bindir/gio" && echo "  gio"
echo '#!/bin/sh' > "$bindir/gio-querymodules"
echo 'dir=`dirname "$0"`' >> "$bindir/gio-querymodules"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/gio-querymodules"
echo "exec \"\$dir/../$bundle/gio-querymodules\" \"\$@\"" >> "$bindir/gio-querymodules"
chmod 755 "$bindir/gio-querymodules" && echo "  gio-querymodules"
echo '#!/bin/sh' > "$bindir/glib-compile-schemas"
echo 'dir=`dirname "$0"`' >> "$bindir/glib-compile-schemas"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/glib-compile-schemas"
echo "exec \"\$dir/../$bundle/glib-compile-schemas\" \"\$@\"" >> "$bindir/glib-compile-schemas"
chmod 755 "$bindir/glib-compile-schemas" && echo "  glib-compile-schemas"
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/gsettings"
echo 'dir=`dirname "$0"`' >> "$bindir/gsettings"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/gsettings"
echo "exec \"\$dir/../$bundle/gsettings\" \"\$@\"" >> "$bindir/gsettings"
chmod 755 "$bindir/gsettings" && echo "  gsettings"
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/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/pcre2grep"
echo 'dir=`dirname "$0"`' >> "$bindir/pcre2grep"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/pcre2grep"
echo "exec \"\$dir/../$bundle/pcre2grep\" \"\$@\"" >> "$bindir/pcre2grep"
chmod 755 "$bindir/pcre2grep" && echo "  pcre2grep"
echo '#!/bin/sh' > "$bindir/pcre2test"
echo 'dir=`dirname "$0"`' >> "$bindir/pcre2test"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/pcre2test"
echo "exec \"\$dir/../$bundle/pcre2test\" \"\$@\"" >> "$bindir/pcre2test"
chmod 755 "$bindir/pcre2test" && echo "  pcre2test"
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/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/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/bitlbee"
echo 'dir=`dirname "$0"`' >> "$bindir/bitlbee"
echo 'case "$dir" in /*) ;; *) dir="`pwd`/$dir" ;; esac' >> "$bindir/bitlbee"
echo "exec \"\$dir/../$bundle/bitlbee\" \"\$@\"" >> "$bindir/bitlbee"
chmod 755 "$bindir/bitlbee" && echo "  bitlbee"
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."
