summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/fdpsh20
1 files changed, 13 insertions, 7 deletions
diff --git a/bin/fdpsh b/bin/fdpsh
index b5a15d4..ca682bf 100755
--- a/bin/fdpsh
+++ b/bin/fdpsh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
########################################################################
# Fedora Documentation Project Interactive Shell
#
@@ -10,10 +10,16 @@
# With neither a "-c" switch or command line arguments, commands are
# accepted from stdin.
########################################################################
-ME=$(basename $0)
-MYDIR=$(dirname $0)
+ME=`basename $0`
+FDPBINDIR=`dirname $0`
USAGE="usage: ${ME} [-c cmd] [file [arg..]]"
-. ${MYDIR}/fdp-functions
+#
+PATH=${FDPBINDIR}:${PATH} export PATH
+FDPDIR=${FDPBINDIR}/../.. export FDPDIR
+SHELL=${FDPBINDIR}/${ME} export SHELL
+#
+. ${FDPBINDIR}/fdp-functions
+#
CMD=
while getopts c: c
do
@@ -23,10 +29,10 @@ do
esac
done
if [ "${CMD}" ]; then
- ${CMD}
+ eval ${CMD}
results=$?
elif [ $# -gt 0 ]; then
- $@
+ eval $@
results=$?
else
while :
@@ -34,7 +40,7 @@ else
echo -n "${ME}> " >&2
read -e cmd
if [ "${cmd}" ]; then
- ${cmd}
+ eval ${cmd}
results=$?
if [ ${results} -gt 0 ]; then
echo "Status = ${results}" >&2