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