[import_images] Automatically converts jpg to png
This commit is contained in:
parent
0c695f0a76
commit
bc8c8aa98b
1 changed files with 4 additions and 1 deletions
|
@ -54,7 +54,10 @@ import_images() {
|
||||||
rm -Rf "${GIT_DIR}/.import/${SOURCE}/${discidList}" >/dev/null 2>&1
|
rm -Rf "${GIT_DIR}/.import/${SOURCE}/${discidList}" >/dev/null 2>&1
|
||||||
mkdir -p "${GIT_DIR}/.import/${SOURCE}/${discidList}"
|
mkdir -p "${GIT_DIR}/.import/${SOURCE}/${discidList}"
|
||||||
for path in ${pathList[@]}; do
|
for path in ${pathList[@]}; do
|
||||||
cp --no-preserve=mode "${path}" "${GIT_DIR}/.import/${SOURCE}/${discidList}/$(sed 's|.*\.||' <<< ${path})"
|
case $(sed 's|.*\.||' <<< ${path}) in
|
||||||
|
(jpg) convert "${path}" "${GIT_DIR}/.import/${SOURCE}/${discidList}/png" ;;
|
||||||
|
(*) cp --no-preserve=mode "${path}" "${GIT_DIR}/.import/${SOURCE}/${discidList}/$(sed 's|.*\.||' <<< ${path})" ;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue