summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-09-16 10:27:27 -0400
committerStephen Gallagher <sgallagh@redhat.com>2009-09-16 10:27:27 -0400
commit58ec88cea5288c0b6a15b65d602bdb46ef877996 (patch)
tree01e42e1ea2842f53308deb6908fe48f0bdbda3f7
parent2d439aba48cf27f808bff15ddd4a1339988a5f79 (diff)
downloadbuild_tools-58ec88cea5288c0b6a15b65d602bdb46ef877996.zip
build_tools-58ec88cea5288c0b6a15b65d602bdb46ef877996.tar.gz
build_tools-58ec88cea5288c0b6a15b65d602bdb46ef877996.tar.xz
Use find -exec instead of backticks into rm -f
-rwxr-xr-xsssd-nightly.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/sssd-nightly.sh b/sssd-nightly.sh
index 32f12b5..90f52af 100755
--- a/sssd-nightly.sh
+++ b/sssd-nightly.sh
@@ -170,12 +170,12 @@ cd /local/sgallagh && rm -Rf sssd-$datestamp
echo "===== PUBLISHING FEDORA 11 YUM REPOSITORY =====" >> $LOGFILE
ssh -i /local/sgallagh/.ssh/repo.priv sgallagh@fedorapeople.org \
- "rm -f `find ~/public_html/repo/f11 -type f -daystart -ctime +6|grep sssd-`"
+ "find ~/public_html/repo/f11 -type f -daystart -ctime +6 -name \"sssd-*\" -exec rm -f {} \;"
scp -i /local/sgallagh/.ssh/repo.priv -pqr /local/sgallagh/repos/f11 sgallagh@fedorapeople.org:public_html/repo/
echo "===== PUBLISHING RHEL 5 YUM REPOSITORY =====" >> $LOGFILE
ssh -i /local/sgallagh/.ssh/repo.priv sgallagh@fedorapeople.org \
- "rm -f `find ~/public_html/repo/f11 -type f -daystart -ctime +6|grep sssd-`"
+ "find ~/public_html/repo/rhel5 -type f -daystart -ctime +6 -name \"sssd-*\" -exec rm -f {} \;"
scp -i /local/sgallagh/.ssh/repo.priv -pqr /local/sgallagh/repos/rhel5 sgallagh@fedorapeople.org:public_html/repo/
echo "===== BUILD CONCLUDED AT `date` =====" >> $LOGFILE