Neels Hofmeyr | 1a4c460 | 2018-03-15 22:04:41 +0100 | [diff] [blame] | 1 | #!dont_run_this |
| 2 | # This file is sourced by */gen_links.sh |
| 3 | |
Neels Hofmeyr | 53fb0cf | 2018-03-15 22:14:38 +0100 | [diff] [blame] | 4 | rm -f .gitignore |
| 5 | |
| 6 | gen_link() { |
| 7 | src="$1" |
| 8 | f="$2" |
| 9 | echo "Linking $f" |
| 10 | ln -sf "$src" "$f" |
| 11 | echo "$f" >> .gitignore |
| 12 | } |
| 13 | |
Neels Hofmeyr | 1a4c460 | 2018-03-15 22:04:41 +0100 | [diff] [blame] | 14 | gen_links() { |
| 15 | DIR=$1 |
| 16 | shift |
| 17 | FILES=$* |
| 18 | for f in $FILES; do |
Neels Hofmeyr | 53fb0cf | 2018-03-15 22:14:38 +0100 | [diff] [blame] | 19 | gen_link "$DIR/$f" "$f" |
Neels Hofmeyr | 1a4c460 | 2018-03-15 22:04:41 +0100 | [diff] [blame] | 20 | done |
| 21 | } |
Neels Hofmeyr | cd11223 | 2018-03-16 00:03:00 +0100 | [diff] [blame] | 22 | |
| 23 | ignore_pp_results() { |
| 24 | for pp in *.ttcnpp; do |
| 25 | ttcn_file="$(echo $pp | sed 's/pp$//')" |
| 26 | echo "$ttcn_file" >> .gitignore |
| 27 | done |
| 28 | } |