diff options
author | Eric Hameleers <alien@slackware.com> | 2009-08-13 09:45:14 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2009-08-13 09:45:14 +0000 |
commit | 133c6a227c8b5d5b64024aa43912b6f5696e3956 (patch) | |
tree | 0a8d8952ff5005a38467412f75d84a3c9f439d0e /compat32-tools/convertpkg-compat32 | |
parent | 8aa44d424e08519f61ade2dc9c49ccb258a9cf3c (diff) | |
download | multilib-133c6a227c8b5d5b64024aa43912b6f5696e3956.tar.gz multilib-133c6a227c8b5d5b64024aa43912b6f5696e3956.tar.xz |
Fix how the script determines that it has to create the output dir
Diffstat (limited to 'compat32-tools/convertpkg-compat32')
-rwxr-xr-x | compat32-tools/convertpkg-compat32 | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/compat32-tools/convertpkg-compat32 b/compat32-tools/convertpkg-compat32 index 4ae995e..ea8f2d3 100755 --- a/compat32-tools/convertpkg-compat32 +++ b/compat32-tools/convertpkg-compat32 @@ -43,17 +43,18 @@ gcc.* function show_help () { # Write the help text to output: cat <<EOF + Usage: $0 <-i input_package_file_name> [-o output_package_file_name] [-d output_directory] [-s custom_slack_desc] $(basename $0) is used to convert 32-bit Slackware packages to compatibility packages for 64-bit variants. required parameters:: - -i input_package_file_name (required; 32-bit package to convert) + -i input_package_file_name : 32-bit package to convert optional parameters:: - -d destination_directory (optional; create package in this directory) - -o output_package_file_name (optional; package name to create) - -s output_slack_desc (optional; slack-desc to use for new package) + -d destination_directory : create package in this directory + -o output_package_file_name : package name to create + -s output_slack_desc : slack-desc to use for new package environment variables: ARCH (target architecture; defaults to \$(uname -m)) @@ -61,6 +62,7 @@ environment variables: output_package_file_name overrides this value) OUTPUT (location to create the package; defaults to /tmp) TMP (location for temporary files; defaults to /tmp) + EOF } @@ -113,7 +115,7 @@ if [ -z "$PKGFILE" -o ! -e "$PKGPATH" ]; then fi # if a destination_directory was specified, abort now if we can not create it: -if [ -z "$OUTPUT" -o ! -d "$OUTPUT" ]; then +if [ -n "$OUTPUT" -a ! -d "$OUTPUT" ]; then echo "Creating output directory '$OUTPUT'..." mkdir -p $OUTPUT if [ ! -w "$OUTPUT" ]; then @@ -194,4 +196,3 @@ fi echo "Package created: $OUTPUT/$OUTPKG" - |