Changeset 1060
- Timestamp:
- Sep 7, 2011, 11:51:20 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
packaging/CreateZIPs.sh
r1041 r1060 77 77 local out_base_sym="$2" 78 78 79 [ -z "$out_base" -o -z "$out_base_sym" ] && \ 80 die "create_zips: invalid arguments." 81 79 82 run mkdir -p "$out_base_sym/" 80 83 … … 89 92 } 90 93 94 create_zips() 95 { 96 [ -z "$start_dir" -o -z "$out_dir" -o \ 97 -z "$pkg_name" -o -z "$full_pkg_name" -o -z "$out_base" ] && \ 98 die "create_zips: invalid arguments." 99 100 local out_base_sym="$out_dir/$full_pkg_name-debuginfo/$pkg_name-$ver_dots" 101 102 # .SYM files 103 split_out_sym "$out_base" "$out_base_sym" 104 105 local cwd=$(pwd) 106 107 run cd "$out_base/.." 108 run zip -SrX9 "$full_pkg_name-$ver_dots.zip" "$pkg_name-$ver_dots" 109 run mv "$full_pkg_name-$ver_dots.zip" "$start_dir/" 110 111 run cd "$out_base_sym/.." 112 run zip -SrX9 "$full_pkg_name-debuginfo-$ver_dots.zip" "$pkg_name-$ver_dots" 113 run mv "$full_pkg_name-debuginfo-$ver_dots.zip" "$start_dir/" 114 115 run cd "$cwd" 116 } 117 91 118 cmd_create() 92 119 { 93 120 local inst_base="$1" 94 95 [ -d $inst_base ] || die "'$inst_base' is not a directory." 121 local build_num="$2" 122 123 [ -d "$inst_base" ] || die "'$inst_base' is not a directory." 96 124 97 125 local qconfig_pri="$inst_base/mkspecs/qconfig.pri" … … 112 140 local ver_dots="$ver_major.$ver_minor.$ver_patch" 113 141 114 echo "Found Qt version $ver_dots." 142 echo "Found Qt version: $ver_dots" 143 144 [ -n "$build_num" ] && ver_dots="$ver_dots-$build_num" 145 146 echo "Full version ID: $ver_dots" 115 147 116 148 cmd_cleanup … … 119 151 # commons 120 152 #-------------------------------------------------------------------------- 153 154 local pkg_name="qt" 121 155 122 156 local designer_dlls="bin/QtDsg*.dll" … … 127 161 #-------------------------------------------------------------------------- 128 162 129 local out_base="$out_dir/qt-$ver_dots"130 local out_base _sym="$out_dir/qt-debuginfo-$ver_dots"163 local full_pkg_name="qt" 164 local out_base="$out_dir/$full_pkg_name/$pkg_name-$ver_dots" 131 165 132 166 # Readmes … … 166 200 > "$out_base/bin/qt.conf" 167 201 168 # .SYM files 169 split_out_sym "$out_base" "$out_base_sym" 170 171 # ZIPs 172 run cd "$out_base" 173 run zip -SrX9 "${out_base##*/}.zip" "." 174 run mv "${out_base##*/}.zip" "$start_dir/" 175 # 176 run cd "$out_base_sym" 177 run zip -SrX9 "${out_base_sym##*/}.zip" "." 178 run mv "${out_base_sym##*/}.zip" "$start_dir/" 179 # 180 run cd "$start_dir" 202 create_zips 181 203 182 204 #-------------------------------------------------------------------------- … … 184 206 #-------------------------------------------------------------------------- 185 207 186 local out_base="$out_dir/qt-develop-$ver_dots"187 local out_base _sym="$out_dir/qt-develop-debuginfo-$ver_dots"208 local full_pkg_name="qt-develop" 209 local out_base="$out_dir/$full_pkg_name/$pkg_name-$ver_dots" 188 210 189 211 # Readmes … … 235 257 cp_files_inst_out "translations/linguist_*" 236 258 237 # .SYM files 238 split_out_sym "$out_base" "$out_base_sym" 239 240 # ZIPs 241 run cd "$out_base" 242 run zip -SrX9 "${out_base##*/}.zip" "." 243 run mv "${out_base##*/}.zip" "$start_dir/" 244 # 245 run cd "$out_base_sym" 246 run zip -SrX9 "${out_base_sym##*/}.zip" "." 247 run mv "${out_base_sym##*/}.zip" "$start_dir/" 248 # 249 run cd "$start_dir" 259 create_zips 250 260 251 261 cmd_cleanup … … 274 284 " 275 285 Usage: 276 $script_name -i <dir> Create allZIPs.277 $script_name cleanup Remove what this script creates (except ZIPs).286 $script_name all [options] Create ZIPs. 287 $script_name cleanup Remove what this script creates (except ZIPs). 278 288 279 289 Options: 280 -i <dir> Qt installation tree location 290 <instdir> (*) Qt installation tree location 291 <bldnum> Build number [none] 281 292 " 282 293 } 283 284 while getopts h?i: OPT; do285 case $OPT in286 i) OPT_install_dir=$OPTARG;;287 h | ?) OPT_help=1288 esac289 done290 shift `expr $OPTIND - 1`291 294 292 295 case "$1" in 293 296 cleanup) cmd_cleanup;; 294 "")295 if [ -n "$ OPT_install_dir" ]; then296 cmd_create $(echo "$ OPT_install_dir" | tr '\\' '/')297 all) 298 if [ -n "$2" ]; then 299 cmd_create $(echo "$2" | tr '\\' '/') "$3" 297 300 else 298 301 cmd_help 299 302 fi;; 300 *) 301 if [ -n "$OPT_help" ]; then cmd_help 302 else die "Invalid command '$1'" 303 fi;; 303 -h|-?|--help|*) cmd_help;; 304 304 esac 305 305
Note:
See TracChangeset
for help on using the changeset viewer.