#!/bin/sh # Display usage cpack_usage() { cat < /dev/null 2> /dev/null; then cpack_usage fi if echo $a | grep "^--version" > /dev/null 2> /dev/null; then cpack_version exit 2 fi if echo $a | grep "^--include-subdir" > /dev/null 2> /dev/null; then cpack_include_subdir=TRUE fi if echo $a | grep "^--exclude-subdir" > /dev/null 2> /dev/null; then cpack_include_subdir=FALSE fi done cpack_version echo "This is a self-extracting archive." toplevel="`pwd`" if [ "x${cpack_prefix_dir}x" != "xx" ] then toplevel="${cpack_prefix_dir}" fi echo "The archive will be extracted to: ${toplevel}" echo "" if [ "x${cpack_include_subdir}x" == "xx" ] then echo "If you want to stop extracting, please press ." echo "Include the subdirectory @CPACK_PACKAGE_FILE_NAME@" [Yn]: read line if [ "x${line}x" != "xnx" -a "x${line}x" != "xNx" ] then cpack_include_subdir=TRUE fi fi if [ "x${cpack_include_subdir}x" == "xTRUEx" ] then toplevel="${toplevel}/@CPACK_PACKAGE_FILE_NAME@" mkdir -p "${toplevel}" fi echo "Extracting... Please wait..." 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 -) exit 0 #----------------------------------------------------------- # Start of TAR.GZ file #-----------------------------------------------------------;