add check that that extension module is compiled before running example scripts

This commit is contained in:
Axel Kohlmeyer
2020-10-20 18:29:43 -04:00
parent 7db669df40
commit fe7628f954
6 changed files with 36 additions and 0 deletions

View File

@ -1,5 +1,11 @@
#!/bin/sh
if [ ! -f libjavalammps.so ]
then \
echo "Need to compile 'libjavalammps.so' first for this script to work"
exit 1
fi
cat > example.java <<EOF
public class example {
static {

View File

@ -1,5 +1,11 @@
#!/bin/sh
if [ ! -f lualammps.so ]
then \
echo "Need to compile 'lualammps.so' first for this script to work"
exit 1
fi
cat > example.lua <<EOF
require("lualammps")

View File

@ -1,5 +1,11 @@
#!/bin/sh
if [ ! -f pllammps.so ]
then \
echo "Need to compile 'pllammps.so' first for this script to work"
exit 1
fi
cat > example.pl <<EOF
use pllammps;

View File

@ -1,5 +1,11 @@
#!/bin/sh
if [ ! -f _pylammps.so ]
then \
echo "Need to compile '_pylammps.so' first for this script to work"
exit 1
fi
cat > example.py <<EOF
from pylammps import *

View File

@ -1,5 +1,11 @@
#!/bin/sh
if [ ! -f rubylammps.so ]
then \
echo "Need to compile 'rubylammps.so' first for this script to work"
exit 1
fi
cat > example.rb <<EOF
require 'rubylammps'

View File

@ -1,5 +1,11 @@
#!/bin/sh
if [ ! -f tcllammps.so ]
then \
echo "Need to compile 'tcllammps.so' first for this script to work"
exit 1
fi
cat > example.tcl <<EOF
load ./tcllammps.so