georges/pictures/gravityof.sh

8 lines
173 B
Bash
Executable file

#!/bin/bash
path="$1"
gravity_path="gravity/$(basename "$path" .jpg).gravity"
if [ -f "$gravity_path" ]; then
read gravity < $gravity_path
fi
echo "${gravity:-center}"