Skip to content

Commit

Permalink
mod xargs placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
kuronekomichael committed Mar 28, 2015
1 parent a4d5a88 commit b3ced9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jenkins-backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ cd "$JENKINS_HOME/jobs/"
ls -1 | while read job_name
do
mkdir -p "$ARC_DIR/jobs/$job_name/"
find "$JENKINS_HOME/jobs/$job_name/" -maxdepth 1 -name *.xml | xargs -i cp {} "$ARC_DIR/jobs/$job_name/"
find "$JENKINS_HOME/jobs/$job_name/" -maxdepth 1 -name "*.xml" | xargs -I {} cp {} "$ARC_DIR/jobs/$job_name/"
done

cd "$TMP_DIR"
Expand Down

2 comments on commit b3ced9e

@kuronekomichael
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xargsの-iは非推奨(The ‘-i’ option is deprecated)らしいので、-I{} に置き換えました。
https://www.gnu.org/software/findutils/manual/html_node/find_html/xargs-options.html

なお、osx yosemite付属のxargsでは-iオプション自体がなくなってました…

@sue445
Copy link

@sue445 sue445 commented on b3ced9e May 6, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sue445#20 で取り込んでおきました

Please sign in to comment.