summaryrefslogtreecommitdiff
path: root/src/sortdata
blob: c15d13c29a327d706a917c8171a3421bedce7ce1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
set -euo pipefail


usage() {
	echo 'Usage: sortdata FILENAME.conf'
}

FILENAME="${1:-}"
eval "$(assert-arg -- "$FILENAME" 'FILENAME.conf')"
. "$(realpath -- "$FILENAME")"


DIR="$(dirname "$FILENAME")"/../../..
f="$DIR"/"$date_iso"-"${sort:-0}".sortdata
printf '%s\n' "$FILENAME" > "$f"
printf '%s\n' "$f"