summaryrefslogtreecommitdiff
path: root/lib/ldpc/LDPC-install
blob: 0ca12acebbd464276df579edf79d8b3a457d9652 (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
#!/bin/sh

# Copy the LPDC programs to the directory specified.  The program file
# might be the name of the program, or (eg, on Cygwin) the name of the
# program with .exe appended.

if [ x$1 == x -o x$2 != x ]; then
    echo Usage: LDPC-install bin-directory
    exit 1
fi

echo Installing LPDC programs in $1

mkdir -p $1

for prog in make-pchk alist-to-pchk pchk-to-alist \
            make-ldpc print-pchk make-gen print-gen \
            rand-src encode transmit decode extract verify; do
    if [ -f $prog ]; then
        cp $prog $1
    elif [ -f $prog.exe ]; then
        cp $prog.exe $1
    else
        echo No program $prog to install
    fi
done

echo Done