Commit 03a7cfd5 authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmbs: cleanup code

parent 8c8be0ab
#!/bin/bash #!/bin/bash
# (c) Etersoft 2003-2009 # (c) Etersoft 2003-2010
# Author: Vitaly Lipatov <lav@etersoft.ru> # Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain # Public domain
# #
...@@ -34,7 +34,7 @@ Usage="Usage: $name [-s -u -c -n --nodeps] spec..." ...@@ -34,7 +34,7 @@ Usage="Usage: $name [-s -u -c -n --nodeps] spec..."
function mygetopts() function mygetopts()
{ {
name=${0##*/} name=${0##*/}
Descr="$name - make src.rpm from spec" Descr="$name - run git repo build or make src.rpm from spec"
phelp() phelp()
{ {
...@@ -129,14 +129,13 @@ extract_tarball_to_dest() ...@@ -129,14 +129,13 @@ extract_tarball_to_dest()
rpmbs_copying_built() rpmbs_copying_built()
{ {
if [ -n "$ETERDESTSRPM" ] ; then [ -n "$ETERDESTSRPM" ] || return
echog "Copying package(s) in \$ETERDESTSRPM" echog "Copying package(s) in \$ETERDESTSRPM"
if is_ssh_target "$ETERDESTSRPM" ; then if is_ssh_target "$ETERDESTSRPM" ; then
scp $LISTBUILT $ETERDESTSRPM || echog "Error during copying" scp $LISTBUILT $ETERDESTSRPM || echog "Error during copying"
else else
mkdir -p $ETERDESTSRPM || echog "Error mkdir $ETERDESTSRPM" mkdir -p $ETERDESTSRPM || echog "Error mkdir $ETERDESTSRPM"
cp -fv $LISTBUILT $ETERDESTSRPM || echog "Error during copying" cp -fv $LISTBUILT $ETERDESTSRPM || echog "Error during copying"
# Publish tarball if target dir is exist # Publish tarball if target dir is exist
if [ -d "$ETERDESTSRPM/tarball" ] ; then if [ -d "$ETERDESTSRPM/tarball" ] ; then
echog "There is tarball dir exists. Extract tarball for other build system compatibility." echog "There is tarball dir exists. Extract tarball for other build system compatibility."
...@@ -145,7 +144,6 @@ rpmbs_copying_built() ...@@ -145,7 +144,6 @@ rpmbs_copying_built()
done done
fi fi
fi fi
fi
} }
if is_girar_name $1 ; then if is_girar_name $1 ; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment