Last active
February 17, 2019 20:25
-
-
Save aimileus/e83db1f70344846d98f4e1aff071644b to your computer and use it in GitHub Desktop.
Bashisms in fedora-toolbox 4cf58d5b729571152a6255404b9af4cc81dcac58
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
possible bashism in toolbox line 21 (should be >word 2>&1): | |
base_toolbox_command=$(basename "$0" 2>&42) | |
possible bashism in toolbox line 23 (should be '.', not 'source'): | |
source /etc/os-release | |
possible bashism in toolbox line 62 (should be >word 2>&1): | |
[ "$1" != "" ] && [ $1 -eq $1 2>&42 ] | |
possible bashism in toolbox line 73 (should be >word 2>&1): | |
rm --force --recursive "$directory" 2>&42 | |
possible bashism in toolbox line 77 (should be >word 2>&1): | |
if ! touch "$directory/spinner-start" 2>&42; then | |
possible bashism in toolbox line 83 (should be >word 2>&1): | |
tput civis 2>&42 | |
possible bashism in toolbox line 87 (should be >word 2>&1): | |
echo "$spinner_animation" | tr " " "\n" 2>&42 | while read frame; do | |
possible bashism in toolbox line 103 (should be >word 2>&1): | |
tput cnorm 2>&42 | |
possible bashism in toolbox line 105 (should be >word 2>&1): | |
if ! touch "$directory/spinner-stop" 2>&42; then | |
possible bashism in toolbox line 119 (should be >word 2>&1): | |
if ! rm "$directory/spinner-start" 2>&42; then | |
possible bashism in toolbox line 128 (should be >word 2>&1): | |
rm --force --recursive "$directory" 2>&42 | |
possible bashism in toolbox line 144 (should be >word 2>&1): | |
if ! $prefix_sudo buildah run $working_container_name -- \ | |
sh -c 'rmdir /home && mkdir -m 0755 -p /var/home && ln -s var/home /home' 2>&42; then | |
possible bashism in toolbox line 145 (should be >word 2>&1): | |
$prefix_sudo buildah rm $working_container_name >/dev/null 2>&42 | |
possible bashism in toolbox line 158 ($UID should be "$(id -ru)"): | |
if ! $prefix_sudo buildah run $working_container_name -- useradd \ | |
--home-dir $HOME \ | |
--no-create-home \ | |
--shell $SHELL \ | |
--uid $UID \ | |
--groups wheel \ | |
$USER \ | |
>/dev/null 2>&42; then | |
possible bashism in toolbox line 158 (should be >word 2>&1): | |
if ! $prefix_sudo buildah run $working_container_name -- useradd \ | |
--home-dir $HOME \ | |
--no-create-home \ | |
--shell $SHELL \ | |
--uid $UID \ | |
--groups wheel \ | |
$USER \ | |
>/dev/null 2>&42; then | |
possible bashism in toolbox line 159 ($UID should be "$(id -ru)"): | |
echo "$base_toolbox_command: failed to create user $USER with UID $UID" | |
possible bashism in toolbox line 163 (should be >word 2>&1): | |
if ! $prefix_sudo buildah run $working_container_name -- passwd -d $USER >/dev/null 2>&42; then | |
possible bashism in toolbox line 168 (should be >word 2>&1): | |
if ! $prefix_sudo buildah run $working_container_name -- passwd -d root >/dev/null 2>&42; then | |
possible bashism in toolbox line 173 (should be >word 2>&1): | |
if ! $prefix_sudo buildah config --volume $HOME $working_container_name >/dev/null 2>&42; then | |
possible bashism in toolbox line 178 (should be >word 2>&1): | |
if ! $prefix_sudo buildah config --volume $XDG_RUNTIME_DIR $working_container_name >/dev/null 2>&42; then | |
possible bashism in toolbox line 183 (should be >word 2>&1): | |
if ! $prefix_sudo buildah config --volume $dbus_system_bus_path $working_container_name >/dev/null 2>&42; then | |
possible bashism in toolbox line 188 (should be >word 2>&1): | |
if ! $prefix_sudo buildah config --volume /dev/dri $working_container_name >/dev/null 2>&42; then | |
possible bashism in toolbox line 193 (should be >word 2>&1): | |
if ! $prefix_sudo buildah config --volume /dev/fuse $working_container_name >/dev/null 2>&42; then | |
possible bashism in toolbox line 198 (should be >word 2>&1): | |
if ! $prefix_sudo buildah config --user $USER $working_container_name >/dev/null 2>&42; then | |
possible bashism in toolbox line 203 (should be >word 2>&1): | |
if ! $prefix_sudo buildah config --workingdir $HOME $working_container_name >/dev/null 2>&42; then | |
possible bashism in toolbox line 221 (should be >word 2>&1): | |
dbus_system_bus_path=$(echo $dbus_system_bus_address | cut --delimiter = --fields 2 2>&42) | |
possible bashism in toolbox line 222 (should be >word 2>&1): | |
dbus_system_bus_path=$(readlink --canonicalize $dbus_system_bus_path 2>&42) | |
possible bashism in toolbox line 224 (should be >word 2>&1): | |
echo "$base_toolbox_command: checking if image $toolbox_image already exists" >&42 | |
possible bashism in toolbox line 226 (should be >word 2>&1): | |
if ! $prefix_sudo buildah inspect --type image $toolbox_image >/dev/null 2>&42; then | |
possible bashism in toolbox line 227 (should be >word 2>&1): | |
echo "$base_toolbox_command: trying to create working container $working_container_name" >&42 | |
possible bashism in toolbox line 228 (should be >word 2>&1): | |
echo "$base_toolbox_command: looking for image localhost/$base_toolbox_image" >&42 | |
possible bashism in toolbox line 232 (should be >word 2>&1): | |
if ! $prefix_sudo buildah from \ | |
--name $working_container_name \ | |
localhost/$base_toolbox_image >/dev/null 2>&42; then | |
possible bashism in toolbox line 233 (should be >word 2>&1): | |
echo "$base_toolbox_command: looking for image $registry/$fgc/$base_toolbox_image" >&42 | |
possible bashism in toolbox line 235 (should be >word 2>&1): | |
if spinner_directory=$(mktemp --directory --tmpdir $spinner_template 2>&42); then | |
possible bashism in toolbox line 247 (should be >word 2>&1): | |
$prefix_sudo buildah from \ | |
--name $working_container_name \ | |
$registry/$fgc/$base_toolbox_image >/dev/null 2>&42 | |
possible bashism in toolbox line 260 (should be >word 2>&1): | |
echo "$base_toolbox_command: trying to configure working container $working_container_name" >&42 | |
possible bashism in toolbox line 262 (should be >word 2>&1): | |
if spinner_directory=$(mktemp --directory --tmpdir $spinner_template 2>&42); then | |
possible bashism in toolbox line 280 (should be >word 2>&1): | |
$prefix_sudo buildah rm $working_container_name >/dev/null 2>&42 | |
possible bashism in toolbox line 284 (should be >word 2>&1): | |
echo "$base_toolbox_command: trying to create image $toolbox_image" >&42 | |
possible bashism in toolbox line 286 (should be >word 2>&1): | |
if spinner_directory=$(mktemp --directory --tmpdir $spinner_template 2>&42); then | |
possible bashism in toolbox line 296 (should be >word 2>&1): | |
$prefix_sudo buildah commit --rm $working_container_name $toolbox_image >/dev/null 2>&42 | |
possible bashism in toolbox line 304 (should be >word 2>&1): | |
$prefix_sudo buildah rm $working_container_name >/dev/null 2>&42 | |
possible bashism in toolbox line 309 (should be >word 2>&1): | |
echo "$base_toolbox_command: created image $toolbox_image" >&42 | |
possible bashism in toolbox line 312 (should be >word 2>&1): | |
echo "$base_toolbox_command: checking if container $toolbox_container already exists" >&42 | |
possible bashism in toolbox line 314 (should be >word 2>&1): | |
if $prefix_sudo podman inspect --type container $toolbox_container >/dev/null 2>&42; then | |
possible bashism in toolbox line 319 (should be >word 2>&1): | |
total_ram=$(awk '( $1 == "MemTotal:" ) { print $2 }' /proc/meminfo 2>&42) # kibibytes | |
possible bashism in toolbox line 328 (should be >word 2>&1): | |
echo "$base_toolbox_command: trying to create container $toolbox_container" >&42 | |
possible bashism in toolbox line 330 (should be >word 2>&1): | |
if spinner_directory=$(mktemp --directory --tmpdir $spinner_template 2>&42); then | |
possible bashism in toolbox line 359 ($UID should be "$(id -ru)"): | |
$prefix_sudo podman create \ | |
--group-add wheel \ | |
--hostname toolbox \ | |
--interactive \ | |
--name $toolbox_container \ | |
--network host \ | |
--privileged \ | |
--security-opt label=disable \ | |
--tmpfs /dev/shm:size=$tmpfs_size \ | |
--tty \ | |
--uidmap $UID:0:1 \ | |
--uidmap 0:1:$UID \ | |
--uidmap $uid_plus_one:$uid_plus_one:$max_minus_uid \ | |
--volume $HOME:$HOME:rslave \ | |
--volume $XDG_RUNTIME_DIR:$XDG_RUNTIME_DIR \ | |
--volume $dbus_system_bus_path:$dbus_system_bus_path \ | |
--volume /dev/dri:/dev/dri \ | |
--volume /dev/fuse:/dev/fuse \ | |
$toolbox_image \ | |
/bin/sh >/dev/null 2>&42 | |
possible bashism in toolbox line 359 (should be >word 2>&1): | |
$prefix_sudo podman create \ | |
--group-add wheel \ | |
--hostname toolbox \ | |
--interactive \ | |
--name $toolbox_container \ | |
--network host \ | |
--privileged \ | |
--security-opt label=disable \ | |
--tmpfs /dev/shm:size=$tmpfs_size \ | |
--tty \ | |
--uidmap $UID:0:1 \ | |
--uidmap 0:1:$UID \ | |
--uidmap $uid_plus_one:$uid_plus_one:$max_minus_uid \ | |
--volume $HOME:$HOME:rslave \ | |
--volume $XDG_RUNTIME_DIR:$XDG_RUNTIME_DIR \ | |
--volume $dbus_system_bus_path:$dbus_system_bus_path \ | |
--volume /dev/dri:/dev/dri \ | |
--volume /dev/fuse:/dev/fuse \ | |
$toolbox_image \ | |
/bin/sh >/dev/null 2>&42 | |
possible bashism in toolbox line 371 (should be >word 2>&1): | |
echo "$base_toolbox_command: created container $toolbox_container" >&42 | |
possible bashism in toolbox line 379 (should be >word 2>&1): | |
echo "$base_toolbox_command: trying to start container $toolbox_container" >&42 | |
possible bashism in toolbox line 381 (should be >word 2>&1): | |
if ! $prefix_sudo podman start $toolbox_container >/dev/null 2>&42; then | |
possible bashism in toolbox line 390 (should be >word 2>&1): | |
echo "$base_toolbox_command: looking for $SHELL in container $toolbox_container" >&42 | |
possible bashism in toolbox line 392 (should be >word 2>&1): | |
if $prefix_sudo podman exec $toolbox_container test -f $SHELL 2>&42; then | |
possible bashism in toolbox line 395 (should be >word 2>&1): | |
echo "$base_toolbox_command: $SHELL not found in $toolbox_container; using $shell_to_exec instead" >&42 | |
possible bashism in toolbox line 398 (should be >word 2>&1): | |
echo "$base_toolbox_command: trying to exec $shell_to_exec in container $toolbox_container" >&42 | |
possible bashism in toolbox line 427 (should be >word 2>&1): | |
$prefix_sudo podman exec \ | |
--env COLORTERM=$COLORTERM \ | |
--env DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS \ | |
$set_dbus_system_bus_address \ | |
--env DESKTOP_SESSION=$DESKTOP_SESSION \ | |
--env DISPLAY=$DISPLAY \ | |
--env LANG=$LANG \ | |
--env SHELL=$SHELL \ | |
--env SSH_AUTH_SOCK=$SSH_AUTH_SOCK \ | |
--env TERM=$TERM \ | |
--env VTE_VERSION=$VTE_VERSION \ | |
--env XDG_CURRENT_DESKTOP=$XDG_CURRENT_DESKTOP \ | |
--env XDG_DATA_DIRS=$XDG_DATA_DIRS \ | |
--env XDG_MENU_PREFIX=$XDG_MENU_PREFIX \ | |
--env XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR \ | |
--env XDG_SEAT=$XDG_SEAT \ | |
--env XDG_SESSION_DESKTOP=$XDG_SESSION_DESKTOP \ | |
--env XDG_SESSION_ID=$XDG_SESSION_ID \ | |
--env XDG_SESSION_TYPE=$XDG_SESSION_TYPE \ | |
--env XDG_VTNR=$XDG_VTNR \ | |
--interactive \ | |
--tty \ | |
$toolbox_container \ | |
capsh --caps="" -- -c 'cd "$1"; export PS1="$2"; shift 2; exec "$@"' \ | |
/bin/sh \ | |
"$PWD" \ | |
"$toolbox_prompt" \ | |
$shell_to_exec -l 2>&42 | |
possible bashism in toolbox line 437 ($'...' should be "$(printf '...')"): | |
output=$($prefix_sudo podman images \ | |
--filter "label=com.redhat.component=fedora-toolbox" \ | |
--format "{{.ID}} {{.Repository}}:{{.Tag}} {{.Created}}" 2>&42 \ | |
| sed "s/ \{2,\}/\t/g" 2>&42 \ | |
| column --separator $'\t' --table --table-columns "IMAGE ID,IMAGE NAME,CREATED") | |
possible bashism in toolbox line 437 (should be >word 2>&1): | |
output=$($prefix_sudo podman images \ | |
--filter "label=com.redhat.component=fedora-toolbox" \ | |
--format "{{.ID}} {{.Repository}}:{{.Tag}} {{.Created}}" 2>&42 \ | |
| sed "s/ \{2,\}/\t/g" 2>&42 \ | |
| column --separator $'\t' --table --table-columns "IMAGE ID,IMAGE NAME,CREATED") | |
possible bashism in toolbox line 440 (echo -e): | |
echo -e "${LBC}Images created by toolbox${NC}" | |
possible bashism in toolbox line 456 ($'...' should be "$(printf '...')"): | |
output=$($prefix_sudo podman ps \ | |
--all \ | |
--filter "label=com.redhat.component=fedora-toolbox" \ | |
--format "{{.ID}} {{.Names}} {{.Created}} {{.Status}} {{.Image}}" 2>&42 \ | |
| sed "s/ \{2,\}/\t/g" 2>&42 \ | |
| column \ | |
--separator $'\t' \ | |
--table \ | |
--table-columns "CONTAINER ID,CONTAINER NAME,CREATED,STATUS,IMAGE NAME" 2>&42) | |
possible bashism in toolbox line 456 (should be >word 2>&1): | |
output=$($prefix_sudo podman ps \ | |
--all \ | |
--filter "label=com.redhat.component=fedora-toolbox" \ | |
--format "{{.ID}} {{.Names}} {{.Created}} {{.Status}} {{.Image}}" 2>&42 \ | |
| sed "s/ \{2,\}/\t/g" 2>&42 \ | |
| column \ | |
--separator $'\t' \ | |
--table \ | |
--table-columns "CONTAINER ID,CONTAINER NAME,CREATED,STATUS,IMAGE NAME" 2>&42) | |
possible bashism in toolbox line 459 (echo -e): | |
echo -e "${LBC}Containers created by toolbox${NC}" | |
possible bashism in toolbox line 460 (should be >word 2>&1): | |
echo "$output" | head --lines 1 2>&42 | |
possible bashism in toolbox line 462 (should be >word 2>&1): | |
echo "$output" | tail --lines +2 2>&42 | |
possible bashism in toolbox line 466 (should be >word 2>&1): | |
container_id=$(echo $container | cut --delimiter " " --fields 1 2>&42) | |
possible bashism in toolbox line 467 (should be >word 2>&1): | |
is_running=$($prefix_sudo podman inspect $container_id --format "{{.State.Running}}" 2>&42) | |
possible bashism in toolbox line 469 (echo -e): | |
echo -e "${LGC}$container${NC}" | |
possible bashism in toolbox line 536 (should be >word 2>&1): | |
arg=$(echo $1 | sed 's/^F\|^f//' 2>&42) | |
possible bashism in toolbox line 542 (should be >word 2>&1): | |
if [ $arg -le 0 2>&42 ]; then |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment