mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-26 09:58:20 +01:00
Merge branch 'android_branch' into french_xlation
Conflicts: xwords4/android/XWords4/res/values/strings.xml
This commit is contained in:
commit
2436ea1211
1 changed files with 45 additions and 0 deletions
45
xwords4/scripts/git-cat.sh
Executable file
45
xwords4/scripts/git-cat.sh
Executable file
|
@ -0,0 +1,45 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -u -e
|
||||
|
||||
REV=HEAD
|
||||
BRANCH=""
|
||||
FILES=""
|
||||
|
||||
usage() {
|
||||
echo "usage: $0 [--branch BRANCH | --rev REV ] path/to/file [path/to/file]*"
|
||||
exit 0
|
||||
}
|
||||
|
||||
while [ $# -ge 1 ]; do
|
||||
case $1 in
|
||||
--branch)
|
||||
shift
|
||||
[ $# -gt 1 ] || usage "--branch requires a parameter"
|
||||
BRANCH=$1
|
||||
;;
|
||||
--rev)
|
||||
shift
|
||||
[ $# -gt 1 ] || usage "--rev requires a parameter"
|
||||
REV=$1
|
||||
;;
|
||||
--help)
|
||||
usage
|
||||
;;
|
||||
*)
|
||||
FILES="$FILES $1"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
[ -n "$FILES" ] || usage
|
||||
|
||||
if [ -n "$BRANCH" ]; then
|
||||
REV=$(git log $BRANCH | grep '^commit' | head -n 1 | awk '{print $2}')
|
||||
fi
|
||||
|
||||
for FILE in $FILES; do
|
||||
FILE=$(git ls-files --full-name $FILE)
|
||||
git show $REV:$FILE
|
||||
done
|
Loading…
Reference in a new issue