2019-10-26 20:05:31 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-11-11 08:32:03 +02:00
|
|
|
if [ $# -eq 1 ]; then
|
2019-10-26 20:05:31 +03:00
|
|
|
DIR=/tmp/images
|
|
|
|
IMGNAME=$(basename $1)
|
|
|
|
|
|
|
|
if [ ! -d $DIR ]; then
|
|
|
|
mkdir $DIR
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -f $DIR/$IMGNAME ]; then
|
|
|
|
wget $1 -O $DIR/$IMGNAME
|
|
|
|
fi
|
|
|
|
|
|
|
|
mimeo $DIR/$IMGNAME
|
|
|
|
|
|
|
|
else
|
|
|
|
DIR=/tmp/images/$(basename $1)
|
|
|
|
|
|
|
|
if [ ! -d $]; then
|
|
|
|
mkdir -p $DIR
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -f $DIR/$IMGNAME ]; then
|
|
|
|
wget -P $DIR $@
|
|
|
|
fi
|
|
|
|
|
|
|
|
mimeo $DIR/*
|
|
|
|
fi
|