#!/bin/bash # Date: Wed, 16 Jul 1997 22:36:49 -0400 (EDT) # From: Jeremy Dinsel # Subject: Re: [gimp] plug-ins # I wrote a short little bash script that takes the current compile and # install options from the makefile of gimp-0.99.9 and an arguement. It will # then compile the plugin and install it if told to. I have posted the # script after this. I'm sure there's better out there.. take it as useful # if you find it to be... # ----- start script ## This program was written by Gerramie Dinsel. No warranty is issued. ## Rights to use and modify this program are granted to all so long as they ## make it better, not worse. 16 July 1997 ## Note that error checking is minimal. This is a quick toss-together. ## dinselj@sighsy.cup.edu if [ "$1" = "help" ];then echo " This script receives one argument--the plugin name--and attempts to" echo "compile it with the current plugin compile options (at time of writing)." echo "The plugin argument should not contain a suffix (ie if compilling blur.c," echo "enter blur)." echo " A second argument is available for installing the plugin--install." echo "This option should follow the plugin name. If compillation of " echo "the plugin was not successful, installation will not perform correctly." echo "Note: If serious errors were encountered, do not install the plugin." echo -e "\n\nExamples:" echo "$0 blur" echo -e "$0 blur install\n" exit fi ## Ensure that a plugin was named. if [ -z $1 ];then echo -e "$0 usage:\n\t$0 []\n" echo -e "help\tHints on using this script" exit fi ## Install process. No checks are made to determine if the plugin was already ## compilled or if it succeded. Errors should be taken as they are received. if [ "$2" = "install" ];then echo "Attempting to install the Gimp Plugin in $HOME/.gimp/plug-ins/ .." ../libtool --mode=install /usr/bin/ginstall -c $1 $HOME/.gimp/plug-ins/$1 echo -e "\n\tEnjoy the GIMP!\n" exit fi ## Okay to proceed and compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/include -I.. -I../gtk+ \ -I/usr/local/include -I/usr/include/gr/ -g -O2 -Wall -c $1.c ../libtool --mode=link gcc -o $1 $1.o -L/usr/local/lib ../libgimp/libgimp.la \ ../gtk+/gtk/libgtk.la ../gtk+/gdk/libgdk.la ../gtk+/glib/libglib.la \ -L/usr/X11R6/lib -lXext -lX11 -lc -lm gcc -o .libs/$1 $1.o -L/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib \ ../libgimp/.libs/libgimp.so -Wl,-rpath -Wl,/usr/local/lib \ ../gtk+/gtk/.libs/libgtk.so -Wl,-rpath -Wl,/usr/local/lib \ ../gtk+/gdk/.libs/libgdk.so -Wl,-rpath -Wl,/usr/local/lib \ ../gtk+/glib/.libs/libglib.so -L/usr/X11R6/lib -lXext -lX11 -lc -lm #--end script # -- Jeremy Dinsel # Cal U Math and Computer # Science World Wide Web # System Administrator