Project

General

Profile

Download (969 Bytes) Statistics
| Branch: | Revision:

git_sitools_idoc / flarecast / workspace / sitools-build / scripts / diff-files.sh @ master

1
#! /bin/bash
2
#${1} correspond au commit d'origine
3
#${2} correspond au commit de fin
4
#${3} correspond au dossier destination du clone
5

    
6
cd ${3}
7

    
8
#check that the tag exists
9
[ "`git tag | grep ^${1}$`" != "${1}" ] && echo "TAG ${1} does not exists, aborting" && exit 1;
10
[ "`git tag | grep ^${2}$`" != "${2}" ] && echo "TAG ${2} does not exists, aborting" && exit 1;
11

    
12
#Génération des fichiers
13
git diff --name-only --diff-filter=MCR ${1} ${2}> modified_list-diff.txt
14
git diff --name-only --diff-filter=A  ${1} ${2}> added_list-diff.txt
15
git diff --name-only --diff-filter=D  ${1} ${2}> deleted_list-diff.txt
16
#git ls-tree -r --name-only ${2} > list-file.txt
17

    
18
# tri des fichiers
19
java -jar ../../lib/FileSorting.jar modified_list-diff.txt modified_list-diff.txt
20
java -jar ../../lib/FileSorting.jar added_list-diff.txt added_list-diff.txt
21
java -jar ../../lib/FileSorting.jar deleted_list-diff.txt deleted_list-diff.txt
22
#java -jar lib/FileSorting.jar list-file.txt list-file.txt