From 9f4ae3f5b1619a81bc2123b757ce9fc260b84ba6 Mon Sep 17 00:00:00 2001 From: mid-kid Date: Mon, 5 Feb 2018 18:46:35 +0100 Subject: [PATCH] wooow quotes --- astronaut/astronautpkg | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/astronaut/astronautpkg b/astronaut/astronautpkg index 66d10cb..0625dad 100755 --- a/astronaut/astronautpkg +++ b/astronaut/astronautpkg @@ -79,12 +79,12 @@ _astronaut_wrapper_post() { cat >> "$dir_install/install/doinst.sh" << 'EOF' config() { NEW="$1" - OLD="$(dirname $NEW)/$(basename $NEW .new)" + OLD="$(dirname "$NEW")/$(basename "$NEW" .new)" # If there's no config file by that name, mv it over: if [ ! -r $OLD ]; then - mv $NEW $OLD - elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy - rm $NEW + mv "$NEW" "$OLD" + elif [ "$(cat "$OLD" | md5sum)" = "$(cat "$NEW" | md5sum)" ]; then # toss the redundant copy + rm "$NEW" fi # Otherwise, we leave the .new copy for the admin to consider... } @@ -102,8 +102,8 @@ EOF if [ -d "$dir_install/$dir_prefix/$dir_data/applications" ]; then mkdir -p "$dir_install/install" cat >> "$dir_install/install/doinst.sh" << EOF -if [ -x /$dir_prefix/$dir_bin/update-desktop-database ]; then - /$dir_prefix/$dir_bin/update-desktop-database -q $dir_prefix/$dir_data/applications >/dev/null 2>&1 +if [ -x '/$dir_prefix/$dir_bin/update-desktop-database' ]; then + '/$dir_prefix/$dir_bin/update-desktop-database' -q '$dir_prefix/$dir_data/applications' >/dev/null 2>&1 fi EOF @@ -113,8 +113,8 @@ EOF if [ -d "$dir_install/$dir_prefix/$dir_data/mime" ]; then mkdir -p "$dir_install/install" cat >> "$dir_install/install/doinst.sh" << EOF -if [ -x /$dir_prefix/$dir_bin/update-mime-database ]; then - /$dir_prefix/$dir_bin/update-mime-database $dir_prefix/$dir_data/mime >/dev/null 2>&1 +if [ -x '/$dir_prefix/$dir_bin/update-mime-database' ]; then + '/$dir_prefix/$dir_bin/update-mime-database' '$dir_prefix/$dir_data/mime' >/dev/null 2>&1 fi EOF @@ -124,9 +124,9 @@ EOF if [ -d "$dir_install/$dir_prefix/$dir_data/icons/hicolor" ]; then mkdir -p "$dir_install/install" cat >> "$dir_install/install/doinst.sh" << EOF -if [ -e $dir_prefix/$dir_data/icons/hicolor/icon-theme.cache ]; then - if [ -x /$dir_prefix/$dir_bin/gtk-update-icon-cache ]; then - /$dir_prefix/$dir_bin/gtk-update-icon-cache -f $dir_prefix/$dir_data/icons/hicolor >/dev/null 2>&1 +if [ -e '$dir_prefix/$dir_data/icons/hicolor/icon-theme.cache' ]; then + if [ -x '/$dir_prefix/$dir_bin/gtk-update-icon-cache' ]; then + '/$dir_prefix/$dir_bin/gtk-update-icon-cache' -f '$dir_prefix/$dir_data/icons/hicolor' >/dev/null 2>&1 fi fi @@ -137,9 +137,9 @@ EOF if [ -d "$dir_install/$dir_prefix/$dir_data/glib-2.0/schemas" ]; then mkdir -p "$dir_install/install" cat >> "$dir_install/install/doinst.sh" << EOF -if [ -e $dir_prefix/$dir_data/glib-2.0/schemas ]; then - if [ -x /$dir_prefix/$dir_bin/glib-compile-schemas ]; then - /$dir_prefix/$dir_bin/glib-compile-schemas $dir_prefix/$dir_data/glib-2.0/schemas >/dev/null 2>&1 +if [ -e '$dir_prefix/$dir_data/glib-2.0/schemas' ]; then + if [ -x '/$dir_prefix/$dir_bin/glib-compile-schemas' ]; then + '/$dir_prefix/$dir_bin/glib-compile-schemas' '$dir_prefix/$dir_data/glib-2.0/schemas' >/dev/null 2>&1 fi fi @@ -150,7 +150,7 @@ EOF if [ -d "$dir_install/$dir_prefix/$dir_lib/gio/modules" ]; then mkdir -p "$dir_install/install" cat >> "$dir_install/install/doinst.sh" << EOF -chroot . /$dir_prefix/$dir_bin/gio-querymodules $dir_prefix/$dir_lib/gio/modules/ 1> /dev/null 2> /dev/null +chroot . '/$dir_prefix/$dir_bin/gio-querymodules' '$dir_prefix/$dir_lib/gio/modules/' 1> /dev/null 2> /dev/null EOF fi @@ -160,7 +160,7 @@ EOF mkdir -p "$dir_install/install" echo "if [ -x /$dir_prefix/$dir_bin/install-info ]; then" >> "$dir_install/install/doinst.sh" find "$dir_install/$dir_prefix/$dir_info" -type f -name '*.info.gz' -printf '%P\0' | while read -d '' -r file; do - echo " chroot . /$dir_prefix/$dir_bin/install-info --info-dir=/$dir_prefix/$dir_info /$file 2> /dev/null" >> "$dir_install/install/doinst.sh" + echo " chroot . '/$dir_prefix/$dir_bin/install-info' --info-dir='/$dir_prefix/$dir_info' '/$file' 2> /dev/null" >> "$dir_install/install/doinst.sh" done echo 'fi' >> "$dir_install/install/doinst.sh" echo >> "$dir_install/install/doinst.sh"