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
   334         kx #!/bin/sh
   334         kx 
   334         kx # Preserve new files
   334         kx install_file() {
   334         kx   NEW="$1"
   334         kx   OLD="`dirname $NEW`/`basename $NEW .new`"
   334         kx   # If there's no file by that name, mv it over:
   334         kx   if [ ! -r $OLD ]; then
   334         kx     mv $NEW $OLD
   334         kx   elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
   334         kx     rm $NEW
   334         kx   fi
   334         kx   # Otherwise, we leave the .new copy for the admin to consider...
   334         kx }
   334         kx 
   334         kx 
   334         kx # arg 1:  the new package version
   334         kx pre_install() {
   334         kx   /bin/true
   334         kx }
   334         kx 
   334         kx # arg 1:  the new package version
   334         kx post_install() {
   334         kx   #
   334         kx   # NOTE:
   334         kx   #   'install-info' can work using relative paths and we can make use build machine
   334         kx   #   utility during installation to the some partition and use target 'install-info'
   334         kx   #   during installation directly on the running target machine.
   334         kx   #
   334         kx   if [ -x /usr/bin/install-info ] ; then
   334         kx     install-info --info-dir=usr/share/info usr/share/info/parted.info.gz 2>/dev/null
   334         kx   elif ! grep "(parted)" usr/share/info/dir 1> /dev/null 2> /dev/null ; then
   334         kx   cat << EOF >> usr/share/info/dir
   334         kx 
   334         kx System administration
   334         kx * parted: (parted).             GNU partitioning software
   334         kx EOF
   334         kx   fi
   334         kx }
   334         kx 
   334         kx # arg 1:  the new package version
   334         kx # arg 2:  the old package version
   334         kx pre_update() {
   334         kx   /bin/true
   334         kx }
   334         kx 
   334         kx # arg 1:  the new package version
   334         kx # arg 2:  the old package version
   334         kx post_update() {
   334         kx   post_install
   334         kx }
   334         kx 
   334         kx # arg 1:  the old package version
   334         kx pre_remove() {
   334         kx   if [ -x /usr/bin/install-info ] ; then
   334         kx     install-info --delete --info-file=usr/share/info/parted.info.gz --dir-file=usr/share/info/dir 2> /dev/null || /bin/true
   334         kx   fi
   334         kx }
   334         kx 
   334         kx # arg 1:  the old package version
   334         kx post_remove() {
   334         kx   /bin/true
   334         kx }
   334         kx 
   334         kx 
   334         kx operation=$1
   334         kx shift
   334         kx 
   334         kx $operation $*