summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tl-update-linked-scripts
blob: 8f9a5b2ef44ba90f63653a8a14b9f0f33541fd6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
# $Id$
# Public domain.  Originally written 2011, Peter Breitenlohner.
#
# This script updates the linked scripts under Build
# (but doesn't commit anything).

mydir=`cd \`dirname $0\` && pwd`
Master=`cd $mydir/../.. && pwd`
Dest=`cd $Master/../Build/source/texk/texlive/linked_scripts && pwd`

test -r $Dest/scripts.lst || {
  echo "$0: \`$Dest/scripts.lst' missing'"
  exit 1
}

. $Dest/scripts.lst

compare_and_copy () {
  Src=$Master/$1/scripts
  shift
  for file in $@; do
    #echo "comparing $Src/$file to $Dest..."
    cmp -s $Src/$file $Dest/$file && continue
    echo "updating $Src/$file -> $Dest/$file"
    diff -u0 $Src/$file $Dest/$file
    cp $Src/$file $Dest/$file
    
    # simpler/clearer history to just update?
    #svn delete --force $Dest/$file && svn copy $Src/$file $Dest/$file || exit 1
    
    # keyword expansion should be off in $Dest, so this shouldn't be needed:
    #cp $Src/$file $Dest/$file
  done
}

compare_and_copy texmf $texmf_scripts
compare_and_copy texmf-dist $texmf_dist_scripts