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