Cleaned up scripts folder and moved some stuff
This commit is contained in:
parent
787982c35b
commit
a2f69c646a
33 changed files with 42 additions and 142 deletions
29
home/.scripts/media/imageviewer
Executable file
29
home/.scripts/media/imageviewer
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/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
|
Loading…
Add table
Add a link
Reference in a new issue