File: build-data-from-source

package info (click to toggle)
triplane 1.0.8-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 16,056 kB
  • sloc: cpp: 14,583; makefile: 93; sh: 29
file content (10 lines) | stat: -rwxr-xr-x 606 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
#!/bin/bash
set -e
cat data_src/pcx.lst | while read pgd pcx name end width height; do
    echo "pgd $pgd pcx $pcx name $name end $end width $width height $height"
    tools/pcx2pgd $(echo $pcx | sed 's/.pcx$//') dummy $width $height > /dev/null
    printf "$name" | dd bs=1 seek=8 count=7 of=$(echo $pcx | sed 's/.pcx$/.pgd/') conv=notrunc 2> /dev/null
    printf "$end" | dd bs=1 seek=$(expr $(find $(echo $pcx | sed 's/.pcx$/.pgd/') -printf %s) - 1) count=1 of=$(echo $pcx | sed 's/.pcx$/.pgd/') conv=notrunc 2> /dev/null
    mkdir -p $(dirname $pgd)
    mv $(echo $pcx | sed 's/.pcx$/.pgd/') $pgd
done