4337af7220
- avoid bashism in gem_build_cleanup OBS-URL: https://build.opensuse.org/request/show/957161 OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/ruby-common?expand=0&rev=114
18 lines
735 B
Bash
18 lines
735 B
Bash
#!/bin/sh
|
|
if [ $# = 1 ] ; then
|
|
if [ -d "$1" ] ; then
|
|
find $1 \
|
|
\( -name \*.o -o -name Makefile -o -name config.log -o -name config.status -o -name Makefile.html -o -name gem_make.out -o -name mkmf.log -o -name \*.bak -o -name .deps -o -name .libs -o -name CVS \) \
|
|
-print0 | xargs -r0 rm -rv || :
|
|
# remove more strict in the docu
|
|
find $1/doc \( -name Makefile.ri -o -name ext -o -name page\*.ri \) -print0 | xargs -r0 rm -rv || :
|
|
find $1 -type d -name '.gem.*' -print0 | xargs -r0 rm -rv || :
|
|
else
|
|
echo "'$1' does not exists or is not a directory! Exiting." >&2
|
|
exit 1
|
|
fi
|
|
else
|
|
echo "Please pass exact one argument to this script! Exiting." >&2
|
|
exit 1
|
|
fi
|