#!/bin/bash
inst_dir=~/maple2017	# Point this variable to the installation directory
dest=$inst_dir/bin.X86_64_LINUX/libmaple.so
printf '\x90\x90' | dd of=$dest bs=1 seek=1111260 count=2 conv=notrunc
printf '\x31\xc0\xc3' | dd of=$dest bs=1 seek=5854912 count=3 conv=notrunc
host_id=`$inst_dir/bin.X86_64_LINUX/lmutil lmhostid -n`
echo "HOST_ID IS: $host_id"
sed "s/000000000000/$host_id/" ./license.dat > $inst_dir/license/license.dat
echo 
