1
0
mirror of https://github.com/OlafvdSpek/ctemplate.git synced 2025-10-05 19:16:54 +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 642af1a013
commit 08b94aff91

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"