Browse Source

wooow quotes

master
mid-kid 7 years ago
parent
commit
9f4ae3f5b1
  1. 32
      astronaut/astronautpkg

32
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"

Loading…
Cancel
Save