run-client.sh script
[citadel.git] / appimage / citadel.AppDir / run-client.sh
1 #!/bin/bash
2
3 # This script attempts to find the Citadel Server running in an AppImage on
4 # the same host, and connects to the text mode client.
5
6 CLIENT_PATH=`ls /tmp/.*/usr/bin/citadel || exit 1` || exit 1
7 CLIENT_DIR=`dirname ${CLIENT_PATH}`
8 export PATH=${CLIENT_DIR}:$PATH
9 export APPDIR=`echo ${CLIENT_DIR} | sed s/'\/usr\/bin'//g`
10 export LD_LIBRARY_PATH=${APPDIR}/usr/lib:$LD_LIBRARY_PATH
11 export CTDL_DIR=$(dirname $(readlink -f $0))
12 ldd $CLIENT_PATH
13 exec $CLIENT_PATH