File: change_ver.sh

package info (click to toggle)
freecell-solver 2.8.10-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, sarge
  • size: 2,864 kB
  • ctags: 1,215
  • sloc: ansic: 14,713; sh: 10,555; perl: 451; python: 349; makefile: 99
file content (11 lines) | stat: -rwxr-xr-x 318 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

VER="`cat ver.txt`"
find . -type f -name '*.pre.*' -o -name '*.pre' | 
    grep -v '~$' |    # Filter out the temporary files
    (while read T ; do
        echo "Changing $T"
        NOPRE_FN=$(echo $T | sed 's/\.pre//')
        cat $T | sed 's/\[{#FCS_VERSION#}\]/'"$VER"'/g' > $NOPRE_FN
    done)