contain spaces.
+2001-09-16 Theodore Tso <tytso@valinux.com>
+
+ * compile_et.sh.in: Make the shell script safe from directory
+ pathnames with spaces.
+
2001-09-10 Theodore Tso <tytso@valinux.com>
* com_err.texinfo: Add appropriate @node and @menu lines so that
#
AWK=@AWK@
DIR="${DIR-@datadir@/et}"
-ET_DIR=@ET_DIR@
+ET_DIR="@ET_DIR@"
if test "x$1" = x ; then
echo "Usage: compile_et file"
exit 1
fi
-if test ! -f $DIR/et_h.awk -o ! -f $DIR/et_c.awk ; then
- DIR=$ET_DIR
+if test ! -f "$DIR/et_h.awk" -o ! -f "$DIR/et_c.awk" ; then
+ DIR="$ET_DIR"
# echo "Falling back to $DIR..."
- if test ! -f $DIR/et_h.awk -o ! -f $DIR/et_c.awk ; then
+ if test ! -f "$DIR/et_h.awk" -o ! -f "$DIR/et_c.awk" ; then
echo "compile_et: Couldn't find compile_et's template files."
exit 1
fi
ROOT=`echo $1 | sed -e s/.et$//`
BASE=`basename $ROOT`
-if test ! -f $ROOT.et ; then
+if test ! -f "$ROOT.et" ; then
echo "compile_et: $ROOT.et: File not found"
exit 1;
fi
-$AWK -f ${DIR}/et_h.awk outfile=${BASE}.h $ROOT.et
-$AWK -f ${DIR}/et_c.awk outfile=${BASE}.c $ROOT.et
+$AWK -f "${DIR}/et_h.awk" "outfile=${BASE}.h" "$ROOT.et"
+$AWK -f "${DIR}/et_c.awk" "outfile=${BASE}.c" "$ROOT.et"
+2001-09-16 Theodore Tso <tytso@valinux.com>
+
+ * mk_cmds.sh.in: Make the shell script safe from directory
+ pathnames with spaces.
+
2001-09-02 Theodore Tso <tytso@thunk.org>
* Release of E2fsprogs 1.24a
#
DIR="${DIR-@datadir@/ss}"
-SS_DIR=@SS_DIR@
+SS_DIR="@SS_DIR@"
AWK=@AWK@
SED=@SED@
fi
if test -n "$_SS_DIR_OVERRIDE" ; then
- DIR=$_SS_DIR_OVERRIDE;
+ DIR="$_SS_DIR_OVERRIDE";
fi
if test ! -f $DIR/ct_c.sed -o ! -f $DIR/ct_c.awk ; then
- DIR=$SS_DIR
+ DIR="$SS_DIR"
# echo "Falling back to $DIR..."
- if test ! -f $DIR/ct_c.sed -o ! -f $DIR/ct_c.awk ; then
+ if test ! -f "$DIR/ct_c.sed" -o ! -f "$DIR/ct_c.awk" ; then
echo "mk_cmds: Couldn't find mk_cmds's template files."
exit 1
fi
fi
-FILE=$1
+FILE="$1"
ROOT=`echo $1 | sed -e s/.ct$//`
-BASE=`basename $ROOT`
-TMP=ct$$.c
+BASE=`basename "$ROOT"`
+TMP="ct$$.c"
-if test ! -f $FILE ; then
+if test ! -f "$FILE" ; then
echo "$FILE: File not found"
exit 1;
fi
-${SED} -f ${DIR}/ct_c.sed ${FILE} \
- | ${AWK} -f ${DIR}/ct_c.awk rootname=${ROOT} outfile=${TMP} -
+${SED} -f "${DIR}/ct_c.sed" "${FILE}" \
+ | ${AWK} -f "${DIR}/ct_c.awk" "rootname=${ROOT}" "outfile=${TMP}" -
-if grep "^#__ERROR_IN_FILE" ${TMP} > /dev/null; then
- rm ${TMP}
+if grep "^#__ERROR_IN_FILE" "${TMP}" > /dev/null; then
+ rm "${TMP}"
exit 1
else
- rm -f ${BASE}.c
- mv ${TMP} ${BASE}.c
+ rm -f "${BASE}.c"
+ mv "${TMP}" "${BASE}.c"
exit 0
fi