xiwrap

slightly higher-level container setup utility
git clone https://git.ce9e.org/xiwrap.git

commit
b8dc05ba50ee716fd74850bfec1e4c58966c70b8
parent
ff86b4e2c3c0ec9a7e3d85a25b73e54ce0381996
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2024-06-15 17:29
do not fail if SRC does not exist

Diffstat

M xiwrap.py 8 +++++---

1 files changed, 5 insertions, 3 deletions


diff --git a/xiwrap.py b/xiwrap.py

@@ -17,9 +17,11 @@ The following options are available:
   17    17 --env VAR [VALUE]       Set an environment variable. If VALUE is not provided,
   18    18                         the value from the current environment is kept.
   19    19 --bind DEST [SRC]       Bind mount the host path SRC on DEST. If SRC is not
   20    -1                         provided, it is the same as DEST.
   -1    20                         provided, it is the same as DEST. Ignored if SRC does
   -1    21                         not exist.
   21    22 --ro-bind DEST [SRC]    Bind mount the host path SRC readonly on DEST. If SRC
   22    -1                         is not provided, it is the same as DEST.
   -1    23                         is not provided, it is the same as DEST. Ignored if SRC
   -1    24                         does not exist.
   23    25 --proc DEST             Mount new procfs on DEST.
   24    26 --dev DEST              Mount new dev on DEST.
   25    27 --tmpfs DEST            Mount new tmpfs on DEST.
@@ -151,7 +153,7 @@ class RuleSet:
  151   153             if src is None:
  152   154                 cmd += [f'--{typ}', target]
  153   155             else:
  154    -1                 cmd += [f'--{typ}', src, target]
   -1   156                 cmd += [f'--{typ}-try', src, target]
  155   157         return cmd + bwrap_args
  156   158 
  157   159