add excldue option
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-tar_scm?expand=0&rev=6
This commit is contained in:
parent
6a86f71ba6
commit
651b9dc1b7
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 30 12:41:57 UTC 2010 - adrian@suse.de
|
||||
|
||||
- add option exclude files/directories when creating the tar ball
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 8 06:29:42 UTC 2010 - wr@rosenauer.org
|
||||
|
||||
|
6
tar_scm
6
tar_scm
@ -44,6 +44,10 @@ while test $# -gt 0; do
|
||||
MYPREFIX="$2"
|
||||
shift
|
||||
;;
|
||||
*-exclude)
|
||||
EXCLUDES="$EXCLUDES --exclude=\'${2#/}\'"
|
||||
shift
|
||||
;;
|
||||
*-filename)
|
||||
MYFILENAME="${2#/}"
|
||||
shift
|
||||
@ -216,7 +220,7 @@ fi
|
||||
|
||||
mv "$FILE/$SUBDIR" "${FILE}-${VERSION}" || exit 1
|
||||
|
||||
tar cf "$MYOUTDIR/${FILE}-${VERSION}.tar" "${FILE}-${VERSION}" || exit 1
|
||||
tar cf "$MYOUTDIR/${FILE}-${VERSION}.tar" $EXCLUDES "${FILE}-${VERSION}" || exit 1
|
||||
rm -rf "${FILE}-${VERSION}"
|
||||
|
||||
exit 0
|
||||
|
@ -24,6 +24,9 @@
|
||||
<parameter name="filename">
|
||||
<description>base file name to be created</description>
|
||||
</parameter>
|
||||
<parameter name="exclude">
|
||||
<description>for sepcifing excludes when creating the tar ball</description>
|
||||
</parameter>
|
||||
<parameter name="version">
|
||||
<description>version to be used in tar</description>
|
||||
</parameter>
|
||||
|
Loading…
Reference in New Issue
Block a user