d-utils

simple utils to use docker images without docker
git clone https://git.ce9e.org/d-utils.git

commit
498e5cb910472dd7034ae8590ad1be9332c97906
parent
13cd755ab0eaf7b35e1d5db91a491a157ca725d3
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2022-08-06 09:40
d-pull: use only img name for dir name by default

Diffstat

M d-pull 10 +++++-----

1 files changed, 5 insertions, 5 deletions


diff --git a/d-pull b/d-pull

@@ -17,11 +17,6 @@ else
   17    17 	img=$1
   18    18 	tag='latest'
   19    19 fi
   20    -1 if [ $# -gt 1 ]; then
   21    -1 	dir=$(realpath -m "$2")
   22    -1 else
   23    -1 	dir=$(realpath -m "$1")
   24    -1 fi
   25    20 if echo "$img" | grep -q '/'; then
   26    21 	lib=$(echo "$img" | cut -f2 -d/)
   27    22 	img=$(echo "$img" | cut -f1 -d/)
@@ -29,6 +24,11 @@ else
   29    24 	lib='library'
   30    25 fi
   31    26 
   -1    27 if [ $# -gt 1 ]; then
   -1    28 	dir=$(realpath -m "$2")
   -1    29 else
   -1    30 	dir=$(realpath -m "$img")
   -1    31 fi
   32    32 if [ -e "$dir" ]; then
   33    33 	echo "$dir already exists"
   34    34 	exit 1