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