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