mirror of
https://git.korhonen.cc/FunctionalHacker/dotfiles.git
synced 2024-11-08 13:10:37 +00:00
b1335a3628
Signed-off-by: Marko Korhonen <marko.korhonen@reekynet.com>
30 lines
359 B
Bash
Executable File
30 lines
359 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ @# -eq 1 ]; then
|
|
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
|