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