Last change
on this file since 1061 was 1061, checked in by Dmitry A. Kuminov, 14 years ago |
packaging: Added CreateRPMs script.
|
-
Property svn:eol-style
set to
native
|
File size:
990 bytes
|
Rev | Line | |
---|
[1061] | 1 | #!/bih/sh
|
---|
| 2 |
|
---|
| 3 | #
|
---|
| 4 | # Qt4 distribution RPM archive creator.
|
---|
| 5 | #
|
---|
| 6 | # NOTE: This script requires the basic set of unix tools such as cp, mkdir,
|
---|
| 7 | # pwd, readlink, find etc.
|
---|
| 8 | #
|
---|
| 9 |
|
---|
| 10 | #
|
---|
| 11 | # Defaults
|
---|
| 12 | #
|
---|
| 13 |
|
---|
| 14 | #
|
---|
| 15 | # Functions
|
---|
| 16 | #
|
---|
| 17 |
|
---|
| 18 | die() { echo "ERROR: $@"; cd "$start_dir"; exit 1; }
|
---|
| 19 |
|
---|
| 20 | run()
|
---|
| 21 | {
|
---|
| 22 | echo "$@"
|
---|
| 23 | "$@" || die \
|
---|
| 24 | "Last command failed (exit status $?)."
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | cmd_create()
|
---|
| 28 | {
|
---|
| 29 | local src_base="$1"
|
---|
| 30 |
|
---|
| 31 | [ -d "$src_base" ] || die "'$src_base' is not a directory."
|
---|
| 32 |
|
---|
| 33 | run cmd /c env.cmd rpmbuild -D "QT_SOURCE_TREE $src_base" -bc qt.spec
|
---|
| 34 | }
|
---|
| 35 |
|
---|
| 36 | #
|
---|
| 37 | # Main
|
---|
| 38 | #
|
---|
| 39 |
|
---|
| 40 | script_path=$(readlink -e $0)
|
---|
| 41 | script_dir=${script_path%/*}
|
---|
| 42 | script_name=$(basename $0)
|
---|
| 43 |
|
---|
| 44 | start_dir=$(pwd)
|
---|
| 45 |
|
---|
| 46 | # Parse arguments
|
---|
| 47 |
|
---|
| 48 | cmd_help()
|
---|
| 49 | {
|
---|
| 50 | echo \
|
---|
| 51 | "
|
---|
| 52 | Usage:
|
---|
| 53 | $script_name test [options] ...
|
---|
| 54 |
|
---|
| 55 | Options:
|
---|
| 56 | <srcdir> (*) Qt SVN source tree location
|
---|
| 57 | "
|
---|
| 58 | }
|
---|
| 59 |
|
---|
| 60 | case "$1" in
|
---|
| 61 | test)
|
---|
| 62 | if [ -n "$2" ]; then
|
---|
| 63 | cmd_create $(echo "$2" | tr '\\' '/')
|
---|
| 64 | else
|
---|
| 65 | cmd_help
|
---|
| 66 | fi;;
|
---|
| 67 | -h|-?|--help|*) cmd_help;;
|
---|
| 68 | esac
|
---|
| 69 |
|
---|
| 70 | # end of story
|
---|
| 71 |
|
---|
| 72 | exit 0
|
---|
Note:
See
TracBrowser
for help on using the repository browser.