1
0
mirror of https://github.com/OlafvdSpek/ctemplate.git synced 2025-09-28 19:05:49 +08:00

Fix a longstanding bug when dpkg isn't present. The idea is

we silently continue in that case, but we run sh -e, which
	causes the script to abort on error, even if the error is
	inside backticks (``).  So we make sure the dpkg command never
	gives an error, even when it's not installed.
	
	Reported in
	   http://code.google.com/p/google-ctemplate/issues/detail?id=79
This commit is contained in:
csilvers 2011-07-27 00:56:05 +00:00
parent bd58467193
commit 9475e9fd4a

View File

@ -52,7 +52,7 @@ cp "$archive" "$RPM_SOURCE_DIR"
# does a better job of this, so if we can run 'dpkg --print-architecture'
# to get the build CPU, we use that in preference of the rpmbuild
# default.
target=`dpkg --print-architecture 2>/dev/null` # "" if dpkg isn't found
target=`dpkg --print-architecture 2>/dev/null || echo ""`
if [ -n "$target" ]
then
target=" --target $target"