summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.bundle.in6
-rw-r--r--Makefile.in2
-rw-r--r--Makefile.src.in6
-rw-r--r--config.lib16
-rwxr-xr-xconfigure2
-rwxr-xr-xfindversion.sh8
6 files changed, 20 insertions, 20 deletions
diff --git a/Makefile.bundle.in b/Makefile.bundle.in
index ef047cd0e..61c15700f 100644
--- a/Makefile.bundle.in
+++ b/Makefile.bundle.in
@@ -33,8 +33,8 @@ endif
bundle: all
@echo '[BUNDLE] Constructing bundle'
- $(Q)rm -rf "${BUNDLE_DIR}"
- $(Q)mkdir -p "${BUNDLE_DIR}"
+ $(Q)rm -rf "$(BUNDLE_DIR)"
+ $(Q)mkdir -p "$(BUNDLE_DIR)"
$(Q)mkdir -p "$(BUNDLE_DIR)/docs"
$(Q)mkdir -p "$(BUNDLE_DIR)/scenario"
$(Q)mkdir -p "$(BUNDLE_DIR)/scenario/heightmap"
@@ -46,7 +46,7 @@ ifdef OSXAPP
$(Q)mkdir -p "$(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources"
$(Q)echo "APPL????" > "$(BUNDLE_DIR)/$(OSXAPP)/Contents/PkgInfo"
$(Q)cp "$(ROOT_DIR)/os/macosx/openttd.icns" "$(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/openttd.icns"
- $(Q)$(ROOT_DIR)/os/macosx/plistgen.sh "${BUNDLE_DIR}/$(OSXAPP)" "$(REV)"
+ $(Q)$(ROOT_DIR)/os/macosx/plistgen.sh "$(BUNDLE_DIR)/$(OSXAPP)" "$(REV)"
$(Q)cp "$(ROOT_DIR)/docs/OSX_install_instructions.txt" "$(BUNDLE_DIR)/docs/"
$(Q)cp "$(ROOT_DIR)/os/macosx/splash.png" "$(DATA_DIR)"
endif
diff --git a/Makefile.in b/Makefile.in
index cc212b1c5..e3ea02e6a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -91,7 +91,7 @@ ifeq ($(shell if test -f config.cache; then echo 1; fi), 1)
@echo " Going to reconfigure with last known settings..."
@echo "----------------"
# Make sure we don't lock config.cache
- @$(shell cat config.cache | sed 's/\\ /\\\\ /g') || exit 1
+ @$(shell cat config.cache | sed 's#\\ #\\\\ #g') || exit 1
@echo "----------------"
@echo "Reconfig done. Please re-execute make."
@echo "----------------"
diff --git a/Makefile.src.in b/Makefile.src.in
index e93d064b7..e8d330183 100644
--- a/Makefile.src.in
+++ b/Makefile.src.in
@@ -96,7 +96,7 @@ MODIFIED := $(shell echo "$(VERSIONS)" | cut -f 3 -d' ')
ifdef REVISION
# Use specified revision (which should be of the form "r000").
REV := $(REVISION)
-REV_NR := $(shell echo $(REVISION) | sed "s/[^0-9]//g")
+REV_NR := $(shell echo $(REVISION) | sed "s#[^0-9]##g")
else
# Use autodetected revisions
REV := $(shell echo "$(VERSIONS)" | cut -f 1 -d' ')
@@ -180,7 +180,7 @@ endif
# Convert x:/... paths to /x/... for mingw
ifeq ($(OS), MINGW)
- @cat Makefile.dep.tmp | sed 's@\([a-zA-Z]\):\/@\/\1\/@g' > Makefile.dep.tmp.mingw
+ @cat Makefile.dep.tmp | sed 's#\([a-zA-Z]\):\/#\/\1\/#g' > Makefile.dep.tmp.mingw
@cp Makefile.dep.tmp.mingw Makefile.dep.tmp
@rm -f Makefile.dep.tmp.mingw
endif
@@ -209,7 +209,7 @@ endif
{ \
print $$0 \
} \
- ' < Makefile.dep.tmp | sed 's/ */ /g;s/ $$//' | $(SORT) > Makefile.dep
+ ' < Makefile.dep.tmp | sed 's# *# #g;s# $$##' | $(SORT) > Makefile.dep
$(Q)rm -f Makefile.dep.tmp Makefile.dep.tmp.bak
diff --git a/config.lib b/config.lib
index 364b03a67..7f693742a 100644
--- a/config.lib
+++ b/config.lib
@@ -390,7 +390,7 @@ save_params() {
configure="$CONFIGURE_EXECUTABLE --ignore-extra-parameters"
for p in $save_params_array; do
eval "v=\"\$$p\""
- p=`echo "$p" | sed 's/_/-/g;s/\n//g;s/ /\\ /g'`
+ p=`echo "$p" | sed 's#_#-#g;s#\n##g;s# #\\ #g'`
# Only save those params that aren't empty
configure="$configure --$p=\"$v\""
done
@@ -846,7 +846,7 @@ check_params() {
doc_dir="$data_dir/docs"
fi
else
- doc_dir="`echo $doc_dir | sed 's/\([^\]\)\\\\ /\1\\\\\\\\ /g;s/\([^\]\) /\1\\\\\\\\ /g'`"
+ doc_dir="`echo $doc_dir | sed 's#\([^\]\)\\\\ #\1\\\\\\\\ #g;s#\([^\]\) #\1\\\\\\\\ #g'`"
fi
if [ "$icon_theme_dir" = "1" ]; then
@@ -856,7 +856,7 @@ check_params() {
icon_theme_dir=""
fi
else
- icon_theme_dir="`echo $icon_theme_dir | sed 's/\([^\]\)\\\\ /\1\\\\\\\\ /g;s/\([^\]\) /\1\\\\\\\\ /g'`"
+ icon_theme_dir="`echo $icon_theme_dir | sed 's#\([^\]\)\\\\ #\1\\\\\\\\ #g;s#\([^\]\) #\1\\\\\\\\ #g'`"
fi
if [ "$personal_dir" = "1" ]; then
@@ -868,7 +868,7 @@ check_params() {
personal_dir=".openttd"
fi
else
- personal_dir="`echo $personal_dir | sed 's/\([^\]\)\\\\ /\1\\\\\\\\ /g;s/\([^\]\) /\1\\\\\\\\ /g'`"
+ personal_dir="`echo $personal_dir | sed 's#\([^\]\)\\\\ #\1\\\\\\\\ #g;s#\([^\]\) #\1\\\\\\\\ #g'`"
fi
if [ "$shared_dir" = "1" ]; then
@@ -879,7 +879,7 @@ check_params() {
shared_dir=""
fi
else
- shared_dir="`echo $shared_dir | sed 's/\([^\]\)\\\\ /\1\\\\\\\\ /g;s/\([^\]\) /\1\\\\\\\\ /g'`"
+ shared_dir="`echo $shared_dir | sed 's#\([^\]\)\\\\ #\1\\\\\\\\ #g;s#\([^\]\) #\1\\\\\\\\ #g'`"
fi
if [ "$man_dir" = "1" ]; then
@@ -890,7 +890,7 @@ check_params() {
man_dir=""
fi
else
- man_dir="`echo $man_dir | sed 's/\([^\]\)\\\\ /\1\\\\\\\\ /g;s/\([^\]\) /\1\\\\\\\\ /g'`"
+ man_dir="`echo $man_dir | sed 's#\([^\]\)\\\\ #\1\\\\\\\\ #g;s#\([^\]\) #\1\\\\\\\\ #g'`"
fi
if [ "$menu_dir" = "1" ]; then
@@ -901,7 +901,7 @@ check_params() {
menu_dir=""
fi
else
- menu_dir="`echo $menu_dir | sed 's/\([^\]\)\\\\ /\1\\\\\\\\ /g;s/\([^\]\) /\1\\\\\\\\ /g'`"
+ menu_dir="`echo $menu_dir | sed 's#\([^\]\)\\\\ #\1\\\\\\\\ #g;s#\([^\]\) #\1\\\\\\\\ #g'`"
fi
# "set_universal_binary_flags" needs to be before "detect_iconv"
@@ -1192,7 +1192,7 @@ make_cflags_and_ldflags() {
if [ "$os" = "OSX" ]; then
# fontconfig_config goes via pkg-config on all systems, which doesn't know --prefix
# Also, despite the reason we link to the .a file ourself (because we can't use -static), we do need to ask pkg-config about possible other deps
- LIBS="$LIBS `$fontconfig_config --variable=prefix`/lib/libfontconfig.a `$fontconfig_config --libs --static | sed s/-lfontconfig//`"
+ LIBS="$LIBS `$fontconfig_config --variable=prefix`/lib/libfontconfig.a `$fontconfig_config --libs --static | sed s#-lfontconfig##`"
else
LIBS="$LIBS `$fontconfig_config --libs --static | tr '\n\r' ' '`"
fi
diff --git a/configure b/configure
index adcdf0595..fb8bc9ba6 100755
--- a/configure
+++ b/configure
@@ -37,7 +37,7 @@ if [ "$1" = "--reconfig" ] || [ "$1" = "--reconfigure" ]; then
exit 1
fi
# Make sure we don't lock config.cache
- cat config.cache | sed 's/\\ /\\\\ /g' > cache.tmp
+ cat config.cache | sed 's#\\ #\\\\ #g' > cache.tmp
sh cache.tmp
rm -f cache.tmp
exit $?
diff --git a/findversion.sh b/findversion.sh
index 184d5121d..e305d58cc 100755
--- a/findversion.sh
+++ b/findversion.sh
@@ -84,8 +84,8 @@ elif [ -d "$ROOT_DIR/.git" ]; then
fi
HASH=`LC_ALL=C git rev-parse --verify HEAD 2>/dev/null | cut -c1-8`
REV="g$HASH"
- BRANCH=`git branch|grep '[*]' | sed 's/\* //;s/^master$//'`
- REV_NR=`LC_ALL=C git log --pretty=format:%s "$SRC_DIR" | grep "^(svn r[0-9]*)" | head -n 1 | sed "s/.*(svn r\([0-9]*\)).*/\1/"`
+ BRANCH=`git branch|grep '[*]' | sed 's#\* ##;s#^master$##'`
+ REV_NR=`LC_ALL=C git log --pretty=format:%s "$SRC_DIR" | grep "^(svn r[0-9]*)" | head -n 1 | sed "s#.*(svn r\([0-9]*\)).*#\1#"`
elif [ -d "$ROOT_DIR/.hg" ]; then
# We are a hg checkout
if [ -n "`hg status \"$SRC_DIR\" | grep -v '^?'`" ]; then
@@ -93,8 +93,8 @@ elif [ -d "$ROOT_DIR/.hg" ]; then
fi
HASH=`LC_ALL=C hg parents 2>/dev/null | head -n 1 | cut -d: -f3 | cut -c1-8`
REV="h$HASH"
- BRANCH=`hg branch | sed 's/^default$//'`
- REV_NR=`LC_ALL=C hg log -r $HASH:0 -k "svn" -l 1 --template "{desc}\n" "$SRC_DIR" | grep "^(svn r[0-9]*)" | head -n 1 | sed "s/.*(svn r\([0-9]*\)).*/\1/"`
+ BRANCH=`hg branch | sed 's#^default$##'`
+ REV_NR=`LC_ALL=C hg log -r $HASH:0 -k "svn" -l 1 --template "{desc}\n" "$SRC_DIR" | grep "^(svn r[0-9]*)" | head -n 1 | sed "s#.*(svn r\([0-9]*\)).*#\1#"`
else
# We don't know
MODIFIED="1"