From b1d200e2cc893f798c35e873e0810730d67a388a Mon Sep 17 00:00:00 2001 From: Manish Singh Date: Thu, 7 May 1998 23:37:04 +0000 Subject: [PATCH] added --install and --install-admin options -Yosh --- ChangeLog | 5 +++++ gimptool-1.2.in | 17 +++++++++++++---- gimptool.in | 17 +++++++++++++---- 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4178da5d3c..8fc4f53b88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu May 7 16:32:15 PDT 1998 Manish Singh + + * gimptool.in: added --install and --install-admin options + to build and install a plug-in automagically + Thu May 7 15:24:31 EDT 1998 Matthew Wilson * app/fileops.c: more changes to fileselection diff --git a/gimptool-1.2.in b/gimptool-1.2.in index 9f6c888f45..c44cf4bb6d 100644 --- a/gimptool-1.2.in +++ b/gimptool-1.2.in @@ -3,12 +3,13 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ exec_prefix_set=no +plug_in_dir=@gimpplugindir@ usage="\ -Usage: gimptool [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags] [--build plug-in.c]" +Usage: gimptool [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags] [--build plug-in.c] [--install plug-in.c] [--install-admin plug-in.c]" noarg="\ -Error: --build needs a filename to work with" +Error: Need a plug-in source file to build" notfound="\ Error: Couldn't find source file to build" @@ -71,14 +72,22 @@ while test $# -gt 0; do --libs) echo -L@libdir@ -lgimpui -lgimp `$gtk_config --libs` ;; - --build) + --build | --install | --install-admin) + case $1 in + --build) + install_dir=. ;; + --install) + install_dir="$HOME/.gimp/plug-ins" ;; + --install-admin) + install_dir="$plug_in_dir/plug-ins" ;; + esac if test @includedir@ != /usr/include ; then includes=-I@includedir@ fi shift if test "x$1" != "x"; then if test -e "$1"; then - cmd="$cc $cflags $includes `gtk-config --cflags` -o `echo $1|sed 's/\.[^\.]*$//'` $1 -L@libdir@ -lgimpui -lgimp `$gtk_config --libs`" + cmd="$cc $cflags $includes `$gtk_config --cflags` -o $install_dir/`echo $1|sed 's/\.[^\.]*$//'` $1 -L@libdir@ -lgimpui -lgimp `$gtk_config --libs`" echo $cmd eval $cmd else diff --git a/gimptool.in b/gimptool.in index 9f6c888f45..c44cf4bb6d 100644 --- a/gimptool.in +++ b/gimptool.in @@ -3,12 +3,13 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ exec_prefix_set=no +plug_in_dir=@gimpplugindir@ usage="\ -Usage: gimptool [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags] [--build plug-in.c]" +Usage: gimptool [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags] [--build plug-in.c] [--install plug-in.c] [--install-admin plug-in.c]" noarg="\ -Error: --build needs a filename to work with" +Error: Need a plug-in source file to build" notfound="\ Error: Couldn't find source file to build" @@ -71,14 +72,22 @@ while test $# -gt 0; do --libs) echo -L@libdir@ -lgimpui -lgimp `$gtk_config --libs` ;; - --build) + --build | --install | --install-admin) + case $1 in + --build) + install_dir=. ;; + --install) + install_dir="$HOME/.gimp/plug-ins" ;; + --install-admin) + install_dir="$plug_in_dir/plug-ins" ;; + esac if test @includedir@ != /usr/include ; then includes=-I@includedir@ fi shift if test "x$1" != "x"; then if test -e "$1"; then - cmd="$cc $cflags $includes `gtk-config --cflags` -o `echo $1|sed 's/\.[^\.]*$//'` $1 -L@libdir@ -lgimpui -lgimp `$gtk_config --libs`" + cmd="$cc $cflags $includes `$gtk_config --cflags` -o $install_dir/`echo $1|sed 's/\.[^\.]*$//'` $1 -L@libdir@ -lgimpui -lgimp `$gtk_config --libs`" echo $cmd eval $cmd else