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