Created
January 27, 2016 14:57
-
-
Save n13i/12a625dfcc4f4b220837 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
LIST=`find . -type d -name ".git" -prune -or -type f -print` | |
# lsコマンドのオプションはFreeBSD 10.1のlsコマンドを想定しているので注意 | |
for f in ${LIST}; do | |
FDATE=`LANG=C ls -l -D "%a, %d %b %Y %T %z" "$f" | cut -d " " -f 9-14` | |
FNAME=`basename "$f"` | |
echo "[$FDATE] [$FNAME] [$f]" | |
git add "$f" | |
git commit --date="$FDATE" --message "Add ${FNAME}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment