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
   357         kx #!/bin/sh
   357         kx 
   357         kx # Preserve new files
   357         kx install_file() {
   357         kx   NEW="$1"
   357         kx   OLD="`dirname $NEW`/`basename $NEW .new`"
   357         kx   # If there's no file by that name, mv it over:
   357         kx   if [ ! -r $OLD ]; then
   357         kx     mv $NEW $OLD
   357         kx   elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
   357         kx     rm $NEW
   357         kx   fi
   357         kx   # Otherwise, we leave the .new copy for the admin to consider...
   357         kx }
   357         kx 
   357         kx 
   357         kx # arg 1:  the new package version
   357         kx pre_install() {
   357         kx   /bin/true
   357         kx }
   357         kx 
   357         kx # arg 1:  the new package version
   357         kx post_install() {
   357         kx   install_file etc/minidlna.conf.new
   357         kx   install_file etc/rc.d/rc.minidlna.new
   357         kx }
   357         kx 
   357         kx # arg 1:  the new package version
   357         kx # arg 2:  the old package version
   357         kx pre_update() {
   357         kx   /bin/true
   357         kx }
   357         kx 
   357         kx # arg 1:  the new package version
   357         kx # arg 2:  the old package version
   357         kx post_update() {
   357         kx   post_install
   357         kx }
   357         kx 
   357         kx # arg 1:  the old package version
   357         kx pre_remove() {
   357         kx   /bin/true
   357         kx }
   357         kx 
   357         kx # arg 1:  the old package version
   357         kx post_remove() {
   357         kx   /bin/true
   357         kx }
   357         kx 
   357         kx 
   357         kx operation=$1
   357         kx shift
   357         kx 
   357         kx $operation $*