Skip to content

Commit

Permalink
Allow mc.sh and rc.sh to work when path to mc/rc.exe has spaces
Browse files Browse the repository at this point in the history
The eval call in these scripts was failing for me because the path to
them on my windows machine contained spaces. I also fixed some
copy/paste-os from when (evidently) the mc.sh script was created by
copying the rc.sh script and modifying it.
  • Loading branch information
Andrew Thompson authored and Andrew Thompson committed Dec 15, 2009
1 parent cb62972 commit 98751d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions erts/etc/win32/cygwin_tools/vc/mc.sh
Expand Up @@ -24,15 +24,15 @@ CMD=""
OUTPUT_DIRNAME=""

# Find the correct mc.exe. This could be done by the configure script,
# But as we seldom use the resource compiler, it might as well be done here...
# But as we seldom use the message compiler, it might as well be done here...
MCC=""
save_ifs=$IFS
IFS=:
for p in $PATH; do
if [ -f $p/mc.exe ]; then
if [ -n "`$p/mc.exe -? 2>&1 >/dev/null </dev/null \
| grep -i \"message compiler\"`" ]; then
MCC=$p/mc.exe
MCC=`echo "$p/mc.exe" | sed 's/ /\\\\ /g'`
fi
fi
done
Expand Down Expand Up @@ -68,8 +68,8 @@ while test -n "$1" ; do
done
p=$$
if [ "X$MC_SH_DEBUG_LOG" != "X" ]; then
echo rc.sh "$SAVE" >>$MC_SH_DEBUG_LOG
echo rc.exe $CMD >>$MC_SH_DEBUG_LOG
echo mc.sh "$SAVE" >>$MC_SH_DEBUG_LOG
echo mc.exe $CMD >>$MC_SH_DEBUG_LOG
fi
if [ -n "$OUTPUT_DIRNAME" ]; then
cd $OUTPUT_DIRNAME
Expand Down
4 changes: 2 additions & 2 deletions erts/etc/win32/cygwin_tools/vc/rc.sh
Expand Up @@ -30,8 +30,8 @@ save_ifs=$IFS
IFS=:
for p in $PATH; do
if [ -f $p/rc.exe ]; then
if [ -n "`$p/rc.exe -? 2>&1 | grep -i "resource compiler"`" ]; then
RCC=$p/rc.exe
if [ -n "`$p/rc.exe -? 2>&1 | grep -i "resource compiler"`" ]; then
RCC=`echo "$p/rc.exe" | sed 's/ /\\\\ /g'`
fi
fi
done
Expand Down

0 comments on commit 98751d5

Please sign in to comment.