summaryrefslogtreecommitdiffstats
path: root/Modules/CPack.STGZ_Header.sh.in
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-07-19 13:42:57 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-07-19 13:42:57 (GMT)
commitad8efca061f2d4462e681fb6f5de8864f59795da (patch)
tree269c243fb75a8c08cbb8a1460ce30a1329ddb5c1 /Modules/CPack.STGZ_Header.sh.in
parentc7770b8edbff442267563bd3036cef8fdb0cc4a9 (diff)
downloadCMake-ad8efca061f2d4462e681fb6f5de8864f59795da.zip
CMake-ad8efca061f2d4462e681fb6f5de8864f59795da.tar.gz
CMake-ad8efca061f2d4462e681fb6f5de8864f59795da.tar.bz2
BUG: fix #5329, if /usr/xpg4/bin/tail exists, use this one -> on SunOS
/usr/bin/tail doesn't understand the -n +<number> syntax -remove standard searchd dirs from FindPHP4.cmake Alex
Diffstat (limited to 'Modules/CPack.STGZ_Header.sh.in')
-rwxr-xr-xModules/CPack.STGZ_Header.sh.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/Modules/CPack.STGZ_Header.sh.in b/Modules/CPack.STGZ_Header.sh.in
index 3372dd0..d0d239f 100755
--- a/Modules/CPack.STGZ_Header.sh.in
+++ b/Modules/CPack.STGZ_Header.sh.in
@@ -123,7 +123,15 @@ echo ""
# take the archive portion of this file and pipe it to tar
# the NUMERIC parameter in this command should be one more
# than the number of lines in this header file
-tail -n +###CPACK_HEADER_LENGTH### "$0" | gunzip | (cd "${toplevel}" && tar xf -) || cpack_echo_exit "Problem unpacking the @CPACK_PACKAGE_FILE_NAME@"
+# on SunOS there are two tails, the one in /usr/bin doesn't understand
+# the -n +<number> syntax, the one in /usr/xpg4/bin/ does
+tail_executable=tail
+if [ -x /usr/xpg4/bin/tail ]
+then
+ tail_executable=/usr/xpg4/bin/tail
+fi
+
+"$tail_executable" -n +###CPACK_HEADER_LENGTH### "$0" | gunzip | (cd "${toplevel}" && tar xf -) || cpack_echo_exit "Problem unpacking the @CPACK_PACKAGE_FILE_NAME@"
echo "Unpacking finished successfully"