|
|
@@ -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"
|
|
|
|