d-utils

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

commit
78da92b122ea733207d5ca24775d72bfd9f43279
parent
498e5cb910472dd7034ae8590ad1be9332c97906
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2022-08-06 09:46
d-pull restructure arg parsing

Diffstat

M d-pull 18 +++++++++---------

1 files changed, 9 insertions, 9 deletions


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

@@ -10,18 +10,18 @@ if [ $# -lt 1 ] || [ "$1" = '-h' ]; then
   10    10 	exit 1
   11    11 fi
   12    12 
   13    -1 if echo "$1" | grep -q '@'; then
   14    -1 	tag=$(echo "$1" | cut -f2 -d@)
   15    -1 	img=$(echo "$1" | cut -f1 -d@)
   -1    13 if echo "$1" | grep -q '/'; then
   -1    14 	lib=$(echo "$1" | cut -d/ -f1)
   -1    15 	img=$(echo "$1" | cut -d/ -f2)
   16    16 else
   17    -1 	img=$1
   18    -1 	tag='latest'
   -1    17 	lib='library'
   -1    18 	img="$1"
   19    19 fi
   20    -1 if echo "$img" | grep -q '/'; then
   21    -1 	lib=$(echo "$img" | cut -f2 -d/)
   22    -1 	img=$(echo "$img" | cut -f1 -d/)
   -1    20 if echo "$img" | grep -q '@'; then
   -1    21 	tag=$(echo "$img" | cut -d@ -f2)
   -1    22 	img=$(echo "$img" | cut -d@ -f1)
   23    23 else
   24    -1 	lib='library'
   -1    24 	tag='latest'
   25    25 fi
   26    26 
   27    27 if [ $# -gt 1 ]; then