8 Options: [defaults in brackets after descriptions]
9 --help print this message
10 --prefix=dir directory in which to install
11 --include-subdir include the @CPACK_PACKAGE_FILE_NAME@ subdirectory
12 --exclude-subdir exclude the @CPACK_PACKAGE_FILE_NAME@ subdirectory
26 echo "@CPACK_PACKAGE_NAME@ Installer Version: @CPACK_PACKAGE_VERSION@, Copyright (c) @CPACK_PACKAGE_VENDOR@"
29 # Helper function to fix windows paths.
32 echo "$1" |
sed 's/\\/\//g'
36 cpack_skip_license
=FALSE
37 cpack_include_subdir
=""
38 for a
in "$@CPACK_AT_SIGN@"; do
39 if echo $a |
grep "^--prefix=" > /dev
/null
2> /dev
/null
; then
40 cpack_prefix_dir
=`echo $a | sed "s/^--prefix=//"`
41 cpack_prefix_dir
=`cpack_fix_slashes "${cpack_prefix_dir}"`
43 if echo $a |
grep "^--help" > /dev
/null
2> /dev
/null
; then
46 if echo $a |
grep "^--version" > /dev
/null
2> /dev
/null
; then
50 if echo $a |
grep "^--include-subdir" > /dev
/null
2> /dev
/null
; then
51 cpack_include_subdir
=TRUE
53 if echo $a |
grep "^--exclude-subdir" > /dev
/null
2> /dev
/null
; then
54 cpack_include_subdir
=FALSE
56 if echo $a |
grep "^--skip-license" > /dev
/null
2> /dev
/null
; then
57 cpack_skip_license
=TRUE
61 if [ "x${cpack_include_subdir}x" != "xx" -o "x${cpack_skip_license}x" = "xTRUEx" ]
67 echo "This is a self-extracting archive."
69 if [ "x${cpack_prefix_dir}x" != "xx" ]
71 toplevel
="${cpack_prefix_dir}"
74 echo "The archive will be extracted to: ${toplevel}"
76 if [ "x${interactive}x" = "xTRUEx" ]
79 echo "If you want to stop extracting, please press <ctrl-C>."
81 if [ "x${cpack_skip_license}x" != "xTRUEx" ]
83 more << ____cpack__here_doc____
84 @CPACK_RESOURCE_FILE_LICENSE_CONTENT@
85 ____cpack__here_doc____
87 echo "Do you accept the license? [yN]: "
91 cpack_license_accepted
=TRUE
;;
93 echo "License not accepted. Exiting ..."
98 if [ "x${cpack_include_subdir}x" = "xx" ]
100 echo "By default the @CPACK_PACKAGE_NAME@ will be installed in:"
101 echo " \"${toplevel}/@CPACK_PACKAGE_FILE_NAME@\""
102 echo "Do you want to include the subdirectory @CPACK_PACKAGE_FILE_NAME@?"
103 echo "Saying no will install in: \"${toplevel}\" [Yn]: "
105 cpack_include_subdir
=TRUE
108 cpack_include_subdir
=FALSE
113 if [ "x${cpack_include_subdir}x" = "xTRUEx" ]
115 toplevel
="${toplevel}/@CPACK_PACKAGE_FILE_NAME@"
116 mkdir
-p "${toplevel}"
119 echo "Using target directory: ${toplevel}"
120 echo "Extracting, please wait..."
123 # take the archive portion of this file and pipe it to tar
124 # the NUMERIC parameter in this command should be one more
125 # than the number of lines in this header file
126 # there are tails which don't understand the "-n" argument, e.g. on SunOS
127 # OTOH there are tails which complain when not using the "-n" argument (e.g. GNU)
128 # so at first try to tail some file to see if tail fails if used with "-n"
129 # if so, don't use "-n"
130 use_new_tail_syntax
="-n"
131 tail $use_new_tail_syntax +1 "$0" > /dev
/null
2> /dev
/null || use_new_tail_syntax
=""
133 tail $use_new_tail_syntax +###CPACK_HEADER_LENGTH### "$0" | gunzip | (cd "${toplevel}" && tar xf -) || cpack_echo_exit "Problem unpacking the @CPACK_PACKAGE_FILE_NAME@"
135 echo "Unpacking finished successfully"
138 #-----------------------------------------------------------
139 # Start of TAR.GZ file
140 #-----------------------------------------------------------;