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
     5         kx #!/bin/sh
     5         kx 
     5         kx # Preserve new files
     5         kx install_file() {
     5         kx   NEW="$1"
     5         kx   OLD="`dirname $NEW`/`basename $NEW .new`"
     5         kx   # If there's no file by that name, mv it over:
     5         kx   if [ ! -r $OLD ]; then
     5         kx     mv $NEW $OLD
     5         kx   elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
     5         kx     rm $NEW
     5         kx   fi
     5         kx   # Otherwise, we leave the .new copy for the admin to consider...
     5         kx }
     5         kx 
     5         kx 
     5         kx # arg 1:  the new package version
     5         kx pre_install() {
     5         kx   /bin/true
     5         kx }
     5         kx 
     5         kx # arg 1:  the new package version
     5         kx post_install() {
     5         kx   #
     5         kx   # NOTE:
     5         kx   #   'install-info' can work using relative paths and we can make use build machine
     5         kx   #   utility during installation to the some partition and use target 'install-info'
     5         kx   #   during installation directly on the running target machine.
     5         kx   #
     5         kx   if [ -x /usr/bin/install-info ] ; then
     5         kx     install-info --info-dir=usr/share/info usr/share/info/standards.info.gz 2>/dev/null
     5         kx   elif ! grep "(standards)" usr/share/info/dir 1> /dev/null 2> /dev/null ; then
     5         kx   cat << EOF >> usr/share/info/dir
     5         kx 
     5         kx GNU organization
     5         kx * Standards: (standards).       GNU coding standards.
     5         kx EOF
     5         kx   fi
     5         kx 
     5         kx   if [ -x /usr/bin/install-info ] ; then
     5         kx     install-info --info-dir=usr/share/info usr/share/info/autoconf.info.gz 2>/dev/null
     5         kx   elif ! grep "(autoconf)" usr/share/info/dir 1> /dev/null 2> /dev/null ; then
     5         kx   cat << EOF >> usr/share/info/dir
     5         kx 
     5         kx Individual utilities
     5         kx * autoconf-invocation: (autoconf)autoconf Invocation.
     5         kx                                                 How to create configuration 
     5         kx                                                   scripts
     5         kx * autoheader: (autoconf)autoheader Invocation.  How to create configuration 
     5         kx                                                   templates
     5         kx * autom4te: (autoconf)autom4te Invocation.      The Autoconf executables 
     5         kx                                                   backbone
     5         kx * autoreconf: (autoconf)autoreconf Invocation.  Remaking multiple 
     5         kx                                                   ‘configure’ scripts
     5         kx * autoscan: (autoconf)autoscan Invocation.      Semi-automatic 
     5         kx                                                   ‘configure.ac’ writing
     5         kx * autoupdate: (autoconf)autoupdate Invocation.  Automatic update of 
     5         kx                                                   ‘configure.ac’
     5         kx * config.status: (autoconf)config.status Invocation.
     5         kx                                                 Recreating configurations.
     5         kx * configure: (autoconf)configure Invocation.    Configuring a package.
     5         kx * ifnames: (autoconf)ifnames Invocation.        Listing conditionals in source.
     5         kx * testsuite: (autoconf)testsuite Invocation.    Running an Autotest test suite.
     5         kx 
     5         kx Software development
     5         kx * Autoconf: (autoconf).         Create source code configuration scripts.
     5         kx EOF
     5         kx   fi
     5         kx }
     5         kx 
     5         kx # arg 1:  the new package version
     5         kx # arg 2:  the old package version
     5         kx pre_update() {
     5         kx   /bin/true
     5         kx }
     5         kx 
     5         kx # arg 1:  the new package version
     5         kx # arg 2:  the old package version
     5         kx post_update() {
     5         kx   post_install
     5         kx }
     5         kx 
     5         kx # arg 1:  the old package version
     5         kx pre_remove() {
     5         kx   if [ -x /usr/bin/install-info ] ; then
     5         kx     install-info --delete --info-file=usr/share/info/standards.info.gz --dir-file=usr/share/info/dir 2> /dev/null || /bin/true
     5         kx     install-info --delete --info-file=usr/share/info/autoconf.info.gz  --dir-file=usr/share/info/dir 2> /dev/null || /bin/true
     5         kx   fi
     5         kx }
     5         kx 
     5         kx # arg 1:  the old package version
     5         kx post_remove() {
     5         kx   /bin/true
     5         kx }
     5         kx 
     5         kx 
     5         kx operation=$1
     5         kx shift
     5         kx 
     5         kx $operation $*