echo "Hello from modifyLIBCIFIX"
cd datagate_libs/LIBCIFX/driver
sed 's/if ! "\${scripts_dir}\/"install_uio_netx install "\${builddir}\/uio_netx"; then/if ! true; then/g' -i build_install_driver
sed 's/install_step="firmware"/install_step="libcifx"/g' -i build_install_driver

cd uio_netx
sed 's/shell uname -r)/shell ls \/usr\/src \| grep rt-amd64 \| cut -d '-' -f 3-4 \)-rt-amd64/g' -i Makefile

cd ../cifx_m2
sed 's/shell uname -r)/shell ls \/usr\/src \| grep rt-amd64 \| cut -d '-' -f 3-4 \)-rt-amd64/g' -i Makefile

cd ../scripts
sed 's/if ! sudo make install; then/if ! true; then/g' -i install_libcifx
sed 's/uname -r)/ls \/usr\/src \| grep rt-amd64 \| cut -d '-' -f 3-4 \)-rt-amd64/g' -i install_uio_netx 

echo "-----------changes on LIBCIFX has been succeeded-------------" 
