Skip to content
Snippets Groups Projects
Commit 7944990a authored by js's avatar js
Browse files

Fully POSIX-compliant shell scripts.

parent 8043bb9f
No related branches found
No related tags found
No related merge requests found
#!/bin/sh #!/bin/sh
if [[ $0 == /* ]]; then cd "$(dirname $0)/src"
BASE=`dirname $0`
else
BASE=`pwd`/`dirname $0`
fi
OS=`uname -s`
if [ "x${OS}" == "xDarwin" ]; then
export RESOURCEPATH="${BASE}/dist/Gajim.app/Contents/Resources"
GTK_DIR="/Library/Frameworks/GTK+.framework/Versions/Current"
export PATH="${GTK_DIR}/bin:$PATH"
export PYTHONPATH="${GTK_DIR}/lib/python2.5/site-packages:${GTK_DIR}/lib/python2.5/site-packages/gtk-2.0:${PYTHONPATH}"
unset GTK_DIR
fi
cd ${BASE}/src
exec python -t gajim.py $@ exec python -t gajim.py $@
...@@ -24,8 +24,9 @@ ...@@ -24,8 +24,9 @@
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details. ## GNU General Public License for more details.
if [ `id -u` -eq 0 ]; then if test $(id -u) -eq 0; then
echo "You must not launch gajim-remote as root, it is INSECURE" echo "You must not launch gajim-remote as root, it is INSECURE"
exit 1
fi fi
datadir=@DATADIR@ datadir=@DATADIR@
......
...@@ -23,8 +23,9 @@ ...@@ -23,8 +23,9 @@
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details. ## GNU General Public License for more details.
if [ `id -u` -eq 0 ]; then if test $(id -u) -eq 0; then
echo "You must not launch Gajim as root, it is INSECURE" echo "You must not launch Gajim as root, it is INSECURE"
exit 1
fi fi
datadir=@DATADIR@ datadir=@DATADIR@
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment