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