2022-12-09 07:54:57 +01:00
|
|
|
#/bin/sh -xe
|
|
|
|
. ${HOME}/.bin/_config
|
|
|
|
|
|
|
|
cd ${PIMDIR}/documents
|
|
|
|
|
|
|
|
_doc=$(ls -1 _incoming | head -1)
|
2022-12-09 09:16:28 +01:00
|
|
|
|
|
|
|
if [ -z "$_doc" ]
|
|
|
|
then
|
|
|
|
echo "Nothing left... wohooo!"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2022-12-09 07:54:57 +01:00
|
|
|
pdfarranger "_incoming/${_doc}" > /dev/null 2>&1 &
|
|
|
|
echo "Here is: ${_doc}"
|
|
|
|
echo "Shall we move it to _done?"
|
|
|
|
read key
|
|
|
|
|
|
|
|
case $key in
|
|
|
|
[yY]) mv "_incoming/${_doc}" done/; ;;
|
2022-12-09 15:33:16 +01:00
|
|
|
[yY][nN]) mv "_incoming/${_doc}" done/; $0; ;;
|
2022-12-09 07:54:57 +01:00
|
|
|
*) echo "What a shame..."; ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
pkill -f /usr/local/bin/pdfarranger
|