aboutsummaryrefslogtreecommitdiffstats
path: root/move-part
blob: 6b71eff2064daf24dd8b081c867b27f1d875b754 (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
#!/bin/sh

. ./config

if [ $# -ne 2 ]
then
    echo "Usage: $0 [part_number] [dest_dir]" 1>&2
    exit 1
fi

partnum="$1"
destdir="$2"

if ! [ -f "$partsdir/$partnum" ]
then
    echo "Part $partnum doesn't exist."
    exit 1
fi

if ! [ -d "$destdir" ]
then
    echo "Destination dir $destdir does not exist."
    exit 1
fi

mkdir -p "$destdir/private"

cp -a "$PUBDIR" "$destdir/"
mv "$partsdir/$partnum" "$destdir/private/mageia-board-$partnum"
cp -p "$seckey_e" "$destdir/private/"