aboutsummaryrefslogtreecommitdiff
path: root/scripts/make-payload
blob: 62c3e34621efe81547148c9fd46016811f8ace69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

set -e
set -u

usage() {
    echo "$0 [directory]"
    exit 1
}

if [ $# = 1 ]; then
    cd "$1" || usage
elif [ $# != 0 ]; then
    usage
fi

gfind * -type d -printf 'dir path=%p\n'
gfind * -type f -printf "file $1/%p path=%p\n"
gfind * -type l -printf 'link path=%p target=%l\n'

exit 0