mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2024-11-21 12:17:17 +03:00
12 lines
No EOL
192 B
Bash
12 lines
No EOL
192 B
Bash
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
if [ -z "$1" ]; then
|
|
echo "usage: $0 <path>"
|
|
exit 1
|
|
fi
|
|
|
|
SUM=$(shasum -a 256 "$1" | cut -d' ' -f1)
|
|
BASENAME=$(basename "$1")
|
|
echo -n "${SUM} ${BASENAME}" > "$1".sha256 |