You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
359 B
Plaintext
30 lines
359 B
Plaintext
5 years ago
|
#!/bin/bash
|
||
|
|
||
5 years ago
|
if [ $# -eq 1 ]; then
|
||
5 years ago
|
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
|