|
@ -79,12 +79,12 @@ _astronaut_wrapper_post() { |
|
|
cat >> "$dir_install/install/doinst.sh" << 'EOF' |
|
|
cat >> "$dir_install/install/doinst.sh" << 'EOF' |
|
|
config() { |
|
|
config() { |
|
|
NEW="$1" |
|
|
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 there's no config file by that name, mv it over: |
|
|
if [ ! -r $OLD ]; then |
|
|
if [ ! -r $OLD ]; then |
|
|
mv $NEW $OLD |
|
|
mv "$NEW" "$OLD" |
|
|
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy |
|
|
elif [ "$(cat "$OLD" | md5sum)" = "$(cat "$NEW" | md5sum)" ]; then # toss the redundant copy |
|
|
rm $NEW |
|
|
rm "$NEW" |
|
|
fi |
|
|
fi |
|
|
# Otherwise, we leave the .new copy for the admin to consider... |
|
|
# 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 |
|
|
if [ -d "$dir_install/$dir_prefix/$dir_data/applications" ]; then |
|
|
mkdir -p "$dir_install/install" |
|
|
mkdir -p "$dir_install/install" |
|
|
cat >> "$dir_install/install/doinst.sh" << EOF |
|
|
cat >> "$dir_install/install/doinst.sh" << EOF |
|
|
if [ -x /$dir_prefix/$dir_bin/update-desktop-database ]; then |
|
|
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 |
|
|
'/$dir_prefix/$dir_bin/update-desktop-database' -q '$dir_prefix/$dir_data/applications' >/dev/null 2>&1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
EOF |
|
|
EOF |
|
@ -113,8 +113,8 @@ EOF |
|
|
if [ -d "$dir_install/$dir_prefix/$dir_data/mime" ]; then |
|
|
if [ -d "$dir_install/$dir_prefix/$dir_data/mime" ]; then |
|
|
mkdir -p "$dir_install/install" |
|
|
mkdir -p "$dir_install/install" |
|
|
cat >> "$dir_install/install/doinst.sh" << EOF |
|
|
cat >> "$dir_install/install/doinst.sh" << EOF |
|
|
if [ -x /$dir_prefix/$dir_bin/update-mime-database ]; then |
|
|
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 |
|
|
'/$dir_prefix/$dir_bin/update-mime-database' '$dir_prefix/$dir_data/mime' >/dev/null 2>&1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
EOF |
|
|
EOF |
|
@ -124,9 +124,9 @@ EOF |
|
|
if [ -d "$dir_install/$dir_prefix/$dir_data/icons/hicolor" ]; then |
|
|
if [ -d "$dir_install/$dir_prefix/$dir_data/icons/hicolor" ]; then |
|
|
mkdir -p "$dir_install/install" |
|
|
mkdir -p "$dir_install/install" |
|
|
cat >> "$dir_install/install/doinst.sh" << EOF |
|
|
cat >> "$dir_install/install/doinst.sh" << EOF |
|
|
if [ -e $dir_prefix/$dir_data/icons/hicolor/icon-theme.cache ]; then |
|
|
if [ -e '$dir_prefix/$dir_data/icons/hicolor/icon-theme.cache' ]; then |
|
|
if [ -x /$dir_prefix/$dir_bin/gtk-update-icon-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 |
|
|
'/$dir_prefix/$dir_bin/gtk-update-icon-cache' -f '$dir_prefix/$dir_data/icons/hicolor' >/dev/null 2>&1 |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
@ -137,9 +137,9 @@ EOF |
|
|
if [ -d "$dir_install/$dir_prefix/$dir_data/glib-2.0/schemas" ]; then |
|
|
if [ -d "$dir_install/$dir_prefix/$dir_data/glib-2.0/schemas" ]; then |
|
|
mkdir -p "$dir_install/install" |
|
|
mkdir -p "$dir_install/install" |
|
|
cat >> "$dir_install/install/doinst.sh" << EOF |
|
|
cat >> "$dir_install/install/doinst.sh" << EOF |
|
|
if [ -e $dir_prefix/$dir_data/glib-2.0/schemas ]; then |
|
|
if [ -e '$dir_prefix/$dir_data/glib-2.0/schemas' ]; then |
|
|
if [ -x /$dir_prefix/$dir_bin/glib-compile-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 |
|
|
'/$dir_prefix/$dir_bin/glib-compile-schemas' '$dir_prefix/$dir_data/glib-2.0/schemas' >/dev/null 2>&1 |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
@ -150,7 +150,7 @@ EOF |
|
|
if [ -d "$dir_install/$dir_prefix/$dir_lib/gio/modules" ]; then |
|
|
if [ -d "$dir_install/$dir_prefix/$dir_lib/gio/modules" ]; then |
|
|
mkdir -p "$dir_install/install" |
|
|
mkdir -p "$dir_install/install" |
|
|
cat >> "$dir_install/install/doinst.sh" << EOF |
|
|
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 |
|
|
EOF |
|
|
fi |
|
|
fi |
|
@ -160,7 +160,7 @@ EOF |
|
|
mkdir -p "$dir_install/install" |
|
|
mkdir -p "$dir_install/install" |
|
|
echo "if [ -x /$dir_prefix/$dir_bin/install-info ]; then" >> "$dir_install/install/doinst.sh" |
|
|
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 |
|
|
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 |
|
|
done |
|
|
echo 'fi' >> "$dir_install/install/doinst.sh" |
|
|
echo 'fi' >> "$dir_install/install/doinst.sh" |
|
|
echo >> "$dir_install/install/doinst.sh" |
|
|
echo >> "$dir_install/install/doinst.sh" |
|
|