improve diec.sh

This commit is contained in:
Benjamin Funke 2025-03-23 12:54:44 +01:00
commit a379cf6112

View file

@ -5,7 +5,7 @@
# This assumes file target is last argument!
# Build with:
# docker build . -t horsicq:diec
# sudo docker build . -t horsicq:diec
TARGET="${@: -1}" # last argument is target file
INPUT_DIR=$(cd $(dirname "$TARGET") && pwd -P)
@ -13,7 +13,7 @@ INPUT_FILE=$(basename $TARGET)
if [ "$#" -eq 0 ]; then
docker run -i horsicq:diec
docker run -i horsicq:diec
elif [ "$#" -eq 1 ]; then
docker run --rm --volume "$INPUT_DIR":/input:ro -i horsicq:diec "/input/$INPUT_FILE";
else