Browse Source

* fixed small bugs in lib/sde-package/package.sh and package-gem.sh

git-svn-id: svn://svn.opensde.net/opensde/opensde/trunk@20572 10447126-35f2-4685-b0cf-6dd780d3921f
misl/sde-wrapper
Alejandro Mery 18 years ago
parent
commit
cab7caa0bd
2 changed files with 9 additions and 10 deletions
  1. +2
    -3
      lib/sde-package/package-gem.sh
  2. +7
    -7
      lib/sde-package/package.sh

+ 2
- 3
lib/sde-package/package-gem.sh

@ -24,7 +24,6 @@ cat <
Creates a GEM file for a given package based on it's flist
Usage: ${0} [--versioned] [--root <root>] [--output <output>] <package>
type package format (tar.gz,tar.bz2,tar.lzo,gem)
root location of the root of the sandbox
output folder to place the binary packages
package name of the package
@ -68,7 +67,7 @@ filename="${pkg_name}${versioned:+-${version}}"
if $SDEROOT/lib/sde-package/package.sh --type "tar.bz2" ${versioned:+--versioned} --root "${root}" \
--output "${output}" "${pkg_name}"; then
echo_status "Converting into GEM format ..."
echo_status "Converting $filename.tar.bz2 into GEM format"
mine -C "${root}/var/adm" "$output/$filename.tar.bz2" "$pkg_name" \
"$output/$filename.gem.tmp"
@ -77,7 +76,7 @@ if $SDEROOT/lib/sde-package/package.sh --type "tar.bz2" ${versioned:+--versioned
echo_error "Failed to create '$output/$filename.gem'"
rm -f "$output/$filename.gem.tmp"
else
mv "$output/$filename.gem{.tmp,}"
mv "$output/$filename.gem"{.tmp,}
fi
echo_status "Removing temporary ${filename}tar.bz2 file"

+ 7
- 7
lib/sde-package/package.sh

@ -67,24 +67,24 @@ fi
output="${output:-.}"
case "$type" in
case "$pkg_type" in
tar.gz) compressor=gzip ;;
tar.bz2) compressor=bzip2 ;;
tar.lzo) compressor=lzop ;;
*) # external type
if [ -x "$SDEROOT/lib/sde-package/package-$type.sh" ]; then
exec $SDEROOT/lib/sde-package/package-$type.sh ${versioned:+--versioned} --root "${root}" \
if [ -x "$SDEROOT/lib/sde-package/package-$pkg_type.sh" ]; then
exec $SDEROOT/lib/sde-package/package-$pkg_type.sh ${versioned:+--versioned} --root "${root}" \
--output "${output}" "${pkg_name}"
else
echo_error "packaging type '$type' not handled."
echo_error "packaging type '$pkg_type' not handled."
exit 3
fi
esac
echo_info "Creating binary package for '$pkg_name' ..."
echo_info "Creating binary package for '$pkg_name'"
mkdir -p "$output"
filename="$pkg_name${versioned:+-${version}}.$type"
filename="$pkg_name${versioned:+-${version}}.$pkg_type"
flist="$root/var/adm/flists/$pkg_name"
( grep ' var/adm' "$flist"
@ -98,5 +98,5 @@ if [ "$errno" != "0" ]; then
rm -f "$output/$filename.tmp"
exit 4
else
mv "$output/$filename{.tmp,}"
mv "$output/$filename"{.tmp,}
fi

Loading…
Cancel
Save