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