X-Git-Url: https://git.sesse.net/?p=rdpsrv;a=blobdiff_plain;f=Xserver%2Fconfig%2Futil%2Faminstall.sh;fp=Xserver%2Fconfig%2Futil%2Faminstall.sh;h=6a8def3f3bbab22ecc54ee4f8c1c4704816395c9;hp=0000000000000000000000000000000000000000;hb=b6e6afccf37f4ad0515ef2a698f714fdf1bf23b3;hpb=e3340a110a3b01756b8e67531395a33b40a17d37 diff --git a/Xserver/config/util/aminstall.sh b/Xserver/config/util/aminstall.sh new file mode 100644 index 0000000..6a8def3 --- /dev/null +++ b/Xserver/config/util/aminstall.sh @@ -0,0 +1,74 @@ +#!/bin/sh +# $XConsortium: aminstall.sh,v 1.1 94/03/29 15:54:08 gildea Exp $ +# aminstall - transfer cross-compiled files to system running Amoeba. +# Usage: aminstall binary-directory [-s stksz] unix-source amoeba-dest + +# +# Default soap mask for files +# +SPMASK=0xFF:2:2 +export SPMASK +PROG=$0 +USAGE="Usage: $PROG binary-directory unix-source amoeba-dest" + +# +# Argument check +# +case $# in +3|5) ;; +*) echo $USAGE >&2 + exit 1 + ;; +esac + +bindir=$1 +stksz= +case $2 in +-s) if [ $# -ne 5 ] + then + echo $USAGE >&2 + exit 1 + fi + stksz="-s $3" + shift + shift + ;; +esac + +unxfile=$2 +dest=$3 + +# +# Change /public .... into /super (just for installation) +# +stripped=`echo $dest | sed 's:^/public::'` +if [ X$dest != X$stripped ]; then + dest=/super$stripped +fi + +# +# If the file already exists, then delete it +# +INFO=`$bindir/std_info $dest 2>&1` +case $INFO in +*"not found"*) ;; +*failed*) ;; +*bytes*) $bindir/del -f $dest + ;; +/??????) echo $PROG: cannot install over directory 1>&2 + exit + ;; +*) $bindir/del -d $dest + ;; +esac + +# +# Transfer the file to Amoeba +# +$bindir/../bin.scripts/ainstall $stksz $unxfile $dest > /dev/null 2>&1 +if [ $? -ne 0 ] +then + echo "This is not binary - using tob" + $bindir/tob $unxfile $dest +fi +