forked from cocos2d/cocos2d-x
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[travis ci] Adds 'for-each-file-in-dir.sh' for generating file list i…
…n cocos2d. CocosRobot will send a PR for that change.
- Loading branch information
James Chen
committed
Mar 6, 2014
1 parent
2d890fe
commit dfdb6c4
Showing
3 changed files
with
36 additions
and
8 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
# exit this script if any commmand fails | ||
set -e | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
PROJECT_ROOT="$DIR"/../.. | ||
|
||
shopt -s dotglob | ||
|
||
echo_all_files() { | ||
for file in $1/* | ||
do | ||
if [ -d "$file" ]; then | ||
echo_all_files "$file" | ||
else | ||
relative_path="${file##*${PROJECT_ROOT}/}" | ||
prefix=${relative_path:0:5} | ||
if [ "$prefix"x != ".git/"x ]; then | ||
echo "\"$relative_path\"," | ||
fi | ||
fi | ||
done | ||
} | ||
|
||
echo "[" | ||
echo_all_files ${PROJECT_ROOT} | ||
echo "]" | ||
|
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