compress.sh: Remove
This commit is contained in:
parent
eb66d1afab
commit
1c5b9e8c3c
32
compress.sh
32
compress.sh
|
@ -1,32 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
source common.sh
|
|
||||||
|
|
||||||
# Ensure that lon-tool installed
|
|
||||||
which lon-tool > /dev/null 2>&1 || {
|
|
||||||
log_err "lon-tool not found"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# shellcheck disable=SC2162
|
|
||||||
find ./raw/ -mindepth 1 -maxdepth 1 | read || {
|
|
||||||
log_err "Nothing to compress"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Settings
|
|
||||||
DATE=$(date +"%d-%m-%y")
|
|
||||||
|
|
||||||
# Begin script
|
|
||||||
log "Start compressing images"
|
|
||||||
log "Current date: ${DATE}"
|
|
||||||
|
|
||||||
for image in raw/*; do
|
|
||||||
full_image_path=$(realpath "$image")
|
|
||||||
image_name=$(basename "$full_image_path")
|
|
||||||
lni_name="${image_name/.img/""}"
|
|
||||||
full_lni_path=$(realpath "./out/${image_name/.img/".lni"}")
|
|
||||||
log "Compressing $lni_name"
|
|
||||||
lon-tool image create -n "$lni_name" -v "$DATE" "$full_image_path" "$full_lni_path"
|
|
||||||
done
|
|
||||||
|
|
||||||
log "Stop compressing images"
|
|
Loading…
Reference in a new issue