#!/bin/csh #******************************************************************************* # Copyright Daniel Grimwood, 2004 # Feel free to distribute and hack up. #******************************************************************************* setenv DEBFILE $1 if ( { test -z $DEBFILE } ) then echo "Error: require a filename as an argument" exit 1 endif if (! -e $DEBFILE) then echo "Error: file $DEBFILE does not exist" exit 1 endif mkdir tmp dpkg-deb -e $DEBFILE tmp/DEBIAN dpkg-deb -x $DEBFILE tmp if (! -e tmp/DEBIAN/postinst) then cat << \"EOF > tmp/DEBIAN/postinst #!/bin/sh \"EOF chmod 0755 tmp/DEBIAN/postinst endif echo DESTINATION='/opt/intel' >> tmp/DEBIAN/postinst cat << \"EOF >> tmp/DEBIAN/postinst { for FILE in $(find $DESTINATION/compiler70/ia??/bin/ -regex '.*[ei][cf]p?c$\|.*cfg$\|.*pcl$\|.*vars[^/]*.c?sh$' 2> /dev/null) ; do sed -e s@\@$DESTINATION@g -e s@man\ -w@manpath@g $FILE > ${FILE}.abs mv ${FILE}.abs $FILE chmod 755 $FILE done } \"EOF dpkg-deb -b tmp $DEBFILE rm -rf tmp