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