set absolute path for snapshots

Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
This commit is contained in:
Michel-FK 2021-01-18 23:23:50 +01:00
parent 7f418686bb
commit 429a66c73e
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ touch "${LOCK_FILE}"
# Increment name and save snapshot
SNAPSHOT_EXT=PNG
SNAPSHOT_DIR=$HOME/snapshots
SNAPSHOT_DIR=/mnt/FunKey/snapshots
mkdir -p "${SNAPSHOT_DIR}"
last=$(cd ${SNAPSHOT_DIR}; ls IMG_*.${SNAPSHOT_EXT} 2> /dev/null | tail -1 | sed 's/^IMG_0*\([0-9]\+\)\.'${SNAPSHOT_EXT}'$/\1/')
let last=${last}+1

View File

@ -19,7 +19,7 @@ touch "${LOCK_FILE}"
# Increment name and save snapshot
SNAPSHOT_EXT=PNG
SNAPSHOT_DIR=$HOME/snapshots
SNAPSHOT_DIR=/mnt/FunKey/snapshots
mkdir -p "${SNAPSHOT_DIR}"
last=$(cd ${SNAPSHOT_DIR}; ls IMG_*.${SNAPSHOT_EXT} 2> /dev/null | tail -1 | sed 's/^IMG_0*\([0-9]\+\)\.'${SNAPSHOT_EXT}'$/\1/')
let last=${last}+1