Radix cross Linux

The main Radix cross Linux repository contains the build scripts of packages, which have the most complete and common functionality for desktop machines

452 Commits   2 Branches   1 Tag
   276         kx #!/bin/sh
   276         kx 
   276         kx # Preserve new files
   276         kx install_file() {
   276         kx   NEW="$1"
   276         kx   OLD="`dirname $NEW`/`basename $NEW .new`"
   276         kx   # If there's no file by that name, mv it over:
   276         kx   if [ ! -r $OLD ]; then
   276         kx     mv $NEW $OLD
   276         kx   elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
   276         kx     rm $NEW
   276         kx   fi
   276         kx   # Otherwise, we leave the .new copy for the admin to consider...
   276         kx }
   276         kx 
   276         kx 
   276         kx # arg 1:  the new package version
   276         kx pre_install() {
   276         kx   /bin/true
   276         kx }
   276         kx 
   276         kx # arg 1:  the new package version
   276         kx post_install() {
   276         kx   # Try to run these.  If they fail, no biggie.
   276         kx   # Also we have to be sure that we are on the working system
   276         kx   # on the target hardware ("proc/sys/kernel/osrelease" - relative path).
   281         kx   if [ -e usr/share/icons/hicolor/icon-theme.cache ] ; then
   281         kx     if [ -r proc/sys/kernel/osrelease -a -x /usr/bin/gtk-update-icon-cache ] ; then
   281         kx       /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor 1> /dev/null 2> /dev/null
   281         kx     fi
   276         kx   fi
   276         kx }
   276         kx 
   276         kx # arg 1:  the new package version
   276         kx # arg 2:  the old package version
   276         kx pre_update() {
   276         kx   /bin/true
   276         kx }
   276         kx 
   276         kx # arg 1:  the new package version
   276         kx # arg 2:  the old package version
   276         kx post_update() {
   276         kx   post_install
   276         kx }
   276         kx 
   276         kx # arg 1:  the old package version
   276         kx pre_remove() {
   276         kx   /bin/true
   276         kx }
   276         kx 
   276         kx # arg 1:  the old package version
   276         kx post_remove() {
   276         kx   /bin/true
   276         kx }
   276         kx 
   276         kx 
   276         kx operation=$1
   276         kx shift
   276         kx 
   276         kx $operation $*