view tools/ecsx @ 1:b5139af1a420 tip basis

Fixed permissions on compile scripts
author Mike Spivey <>
date Fri, 13 Oct 2017 17:27:58 +0100
parents bfdcc3820b32
line wrap: on
line source

# Usage: ecsx b.s pas0.c
ARMGCC='arm-linux-gnueabihf-gcc -marm -march=armv6'

# Make sure socket directory exists
mkdir -p ~/.ssh/sockets

# Remote temp directory for this test

# Form a batch job
( echo /bin/mkdir -p $dir
  # Create source files
  for f in $*; do
      echo "/bin/cat >$dir/$f <<\\EOF"
      cat $f
      echo EOF
  # Compile and run
  echo "(cd $dir; set -x;
		$ARMGCC $* -static -o b.out && $QEMU ./b.out)"
  # Delete the directory
  echo /bin/rm -rf $dir ) \
# Submit it to the server, reusing a previous connection if possible
    ssh -o 'ControlMaster auto' -o 'ControlPath ~/.ssh/sockets/%r@%h-%p' \
          -o 'ControlPersist 600' $HOST /bin/bash