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   rm -f usr/bin/32/2to3
     5         kx   ln -sfr usr/bin/32/2to3-3.10 usr/bin/32/2to3
     5         kx 
     5         kx   for file in idle pydoc pynche python ; do
     5         kx     rm -f usr/bin/32/${file}
     5         kx     ln -sfr usr/bin/32/${file}3 usr/bin/32/${file}
     5         kx   done
     5         kx 
     5         kx   rm -f usr/bin/32/python-config
     5         kx   ln -sfr usr/bin/32/python3-config usr/bin/32/python-config
     5         kx 
     5         kx   for file in msgfmt pygettext ; do
     5         kx     rm -f usr/bin/32/${file}.py
     5         kx     ln -sfr usr/bin/32/${file}-3.10.py usr/bin/32/${file}.py
     5         kx   done
     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   /bin/true
     5         kx }
     5         kx 
     5         kx # arg 1:  the old package version
     5         kx post_remove() {
     5         kx   rm -f usr/bin/32/2to3
     5         kx   if [ -x "usr/bin/32/2to3-2.7" ] ; then
     5         kx     ln -sfr usr/bin/32/2to3-2.7 usr/bin/32/2to3
     5         kx   fi
     5         kx 
     5         kx   for file in idle pydoc pynche python ; do
     5         kx     rm -f usr/bin/32/${file}
     5         kx     if [ -L "usr/bin/32/${file}2" ] ; then
     5         kx       ln -sfr usr/bin/32/${file}2 usr/bin/32/${file}
     5         kx     fi
     5         kx   done
     5         kx 
     5         kx   rm -f usr/bin/32/python-config
     5         kx   if [ -L "usr/bin/32/python2-config" ] ; then
     5         kx     ln -sfr usr/bin/32/python2-config usr/bin/32/python-config
     5         kx   fi
     5         kx 
     5         kx   for file in msgfmt pygettext ; do
     5         kx     rm -f usr/bin/32/${file}.py
     5         kx     if [ -L "usr/bin/32/${file}-2.7.py" ] ; then
     5         kx       ln -sfr usr/bin/32/${file}-2.7.py usr/bin/32/${file}.py
     5         kx     fi
     5         kx   done
     5         kx }
     5         kx 
     5         kx 
     5         kx operation=$1
     5         kx shift
     5         kx 
     5         kx $operation $*