summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2016-02-29 10:50:25 +0100
committerAlexander Larsson <alexl@redhat.com>2016-02-29 10:50:25 +0100
commit05762b42fba2fea394c2810e5bef98e9a38b9cdf (patch)
tree8bbd2ffc7b6753ea42cdd80876e3e4ce3cf53f31 /demos
parentcaa95735c8476f702b277c6e771fcc9b19d02387 (diff)
downloadbubblewrap-05762b42fba2fea394c2810e5bef98e9a38b9cdf.tar.gz
Make commandline args shorter, drom --mount and --make prefixes
Its pretty obvious (in this context) what e.g. --bind does. Having unnecessary large names just makes things harder to read.
Diffstat (limited to 'demos')
-rwxr-xr-xdemos/bubblewrap-shell.sh24
-rwxr-xr-xdemos/xdg-app-run.sh56
2 files changed, 40 insertions, 40 deletions
diff --git a/demos/bubblewrap-shell.sh b/demos/bubblewrap-shell.sh
index 059ee8b..e04a6bc 100755
--- a/demos/bubblewrap-shell.sh
+++ b/demos/bubblewrap-shell.sh
@@ -10,19 +10,19 @@ getent group `id -g` 65534 > ${GROUP}
( # Remove temporary files before calling bwrap, they are open in the fds anyway
rm $GROUP
rm $PASSWD
- bwrap --mount-ro-bind /usr /usr \
- --make-dir /tmp \
- --mount-proc /proc \
- --mount-dev /dev \
- --mount-ro-bind /etc/resolv.conf /etc/resolv.conf \
- --make-file 11 /etc/passwd \
- --make-file 12 /etc/group \
- --make-symlink usr/lib /lib \
- --make-symlink usr/lib64 /lib64 \
- --make-symlink usr/bin /bin \
- --make-symlink usr/sbin /sbin \
+ bwrap --ro-bind /usr /usr \
+ --dir /tmp \
+ --proc /proc \
+ --dev /dev \
+ --ro-bind /etc/resolv.conf /etc/resolv.conf \
+ --file 11 /etc/passwd \
+ --file 12 /etc/group \
+ --symlink usr/lib /lib \
+ --symlink usr/lib64 /lib64 \
+ --symlink usr/bin /bin \
+ --symlink usr/sbin /sbin \
--chdir / \
--unshare-pid \
- --make-dir /run/user/$(id -u) \
+ --dir /run/user/$(id -u) \
--setenv XDG_RUNTIME_DIR "/run/user/`id -u`" \
/bin/sh) 11< ${PASSWD} 12< ${GROUP}
diff --git a/demos/xdg-app-run.sh b/demos/xdg-app-run.sh
index e8f548a..0461685 100755
--- a/demos/xdg-app-run.sh
+++ b/demos/xdg-app-run.sh
@@ -26,36 +26,36 @@ getent group `id -g` 65534 > ${GROUP}
rm $GROUP
rm $PASSWD
bwrap \
- --mount-ro-bind ~/.local/share/xdg-app/runtime/org.gnome.Platform/x86_64/master/active/files /usr \
+ --ro-bind ~/.local/share/xdg-app/runtime/org.gnome.Platform/x86_64/master/active/files /usr \
--lock-file /usr/.ref \
- --mount-ro-bind ~/.local/share/xdg-app/app/org.gnome.Weather/x86_64/master/active/files/ /app \
+ --ro-bind ~/.local/share/xdg-app/app/org.gnome.Weather/x86_64/master/active/files/ /app \
--lock-file /app/.ref \
- --mount-dev /dev \
- --mount-proc /proc \
- --make-dir /tmp \
- --make-symlink /tmp /var/tmp \
- --make-symlink /run /var/run \
- --make-symlink usr/lib /lib \
- --make-symlink usr/lib64 /lib64 \
- --make-symlink usr/bin /bin \
- --make-symlink usr/sbin /sbin \
- --make-symlink usr/etc /etc \
- --make-dir /run/user/`id -u` \
- --make-bind-file 11 /usr/etc/passwd \
- --make-bind-file 12 /usr/etc/group \
- --mount-ro-bind /etc/machine-id /usr/etc/machine-id \
- --mount-ro-bind /etc/resolv.conf /run/host/monitor/resolv.conf \
- --make-file 10 /run/user/`id -u`/xdg-app-info \
- --mount-ro-bind /sys/block /sys/block \
- --mount-ro-bind /sys/bus /sys/bus \
- --mount-ro-bind /sys/class /sys/class \
- --mount-ro-bind /sys/dev /sys/dev \
- --mount-ro-bind /sys/devices /sys/devices \
- --mount-dev-bind /dev/dri /dev/dri \
- --mount-bind /tmp/.X11-unix/X0 /tmp/.X11-unix/X99 \
- --mount-bind ~/.var/app/org.gnome.Weather ~/.var/app/org.gnome.Weather \
- --mount-bind ~/.config/dconf ~/.config/dconf \
- --mount-bind /run/user/`id -u`/dconf /run/user/`id -u`/dconf \
+ --dev /dev \
+ --proc /proc \
+ --dir /tmp \
+ --symlink /tmp /var/tmp \
+ --symlink /run /var/run \
+ --symlink usr/lib /lib \
+ --symlink usr/lib64 /lib64 \
+ --symlink usr/bin /bin \
+ --symlink usr/sbin /sbin \
+ --symlink usr/etc /etc \
+ --dir /run/user/`id -u` \
+ --bind-data 11 /usr/etc/passwd \
+ --bind-data 12 /usr/etc/group \
+ --ro-bind /etc/machine-id /usr/etc/machine-id \
+ --ro-bind /etc/resolv.conf /run/host/monitor/resolv.conf \
+ --file 10 /run/user/`id -u`/xdg-app-info \
+ --ro-bind /sys/block /sys/block \
+ --ro-bind /sys/bus /sys/bus \
+ --ro-bind /sys/class /sys/class \
+ --ro-bind /sys/dev /sys/dev \
+ --ro-bind /sys/devices /sys/devices \
+ --dev-bind /dev/dri /dev/dri \
+ --bind /tmp/.X11-unix/X0 /tmp/.X11-unix/X99 \
+ --bind ~/.var/app/org.gnome.Weather ~/.var/app/org.gnome.Weather \
+ --bind ~/.config/dconf ~/.config/dconf \
+ --bind /run/user/`id -u`/dconf /run/user/`id -u`/dconf \
--unshare-pid \
--setenv XDG_RUNTIME_DIR "/run/user/`id -u`" \
--setenv DISPLAY :99 \