m3_lightmeter/.github/scripts/restore_from_base64.sh

15 lines
255 B
Bash
Raw Normal View History

2024-02-04 15:03:06 +00:00
content="$1"
filename="$2"
if [[ ! -n "$content" ]]; then
echo "Provide file content"
exit 1
fi
if [[ ! -n "$filename" ]]; then
echo "Provide a path to an output file"
exit 1
fi
echo -n "$content" | base64 --decode --output "$filename"