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