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