# Installation of GIMP Paint Studio (GPS) # Currently implemented for Linux/Unix users only. # Written by Michael J. Hammel # License: Same as GPS # ------------------------------------------------------ ifdef GIMP2_DIRECTORY INSTALLDIR = $(GIMP2_DIRECTORY) else INSTALLDIR = $(HOME)/.gimp-2.6 endif BRUSHDIR = $(INSTALLDIR)/brushes PALETTEDIR = $(INSTALLDIR)/palettes TOOLOPTDIR = $(INSTALLDIR)/tool-options TOOLRC = $(INSTALLDIR)/toolrc SESSIONRC = $(INSTALLDIR)/sessionrc all: help help: @echo To install using using make, run: @echo " make install" @echo To restore previous installation: @echo " make restore" @echo To install manually: @echo " See the GPS.pdf file for installation instructions." @echo Environment variables and their defaults: @echo "GIMP2_DIRECTORY $(INSTALLDIR)" install: @if [ -d "$(INSTALLDIR)" ]; then \ INSTALLDIR=$(INSTALLDIR) make -s gps; \ else \ echo "$(INSTALLDIR) does not exist. Installation failed."; \ fi gps: @echo "Installing to $(INSTALLDIR)" @if [ -d "$(BRUSHDIR)" ]; then mv $(BRUSHDIR) $(BRUSHDIR).orig; fi @if [ -d "$(PALETTEDIR)" ]; then mv $(PALETTEDIR) $(PALETTEDIR).orig; fi @if [ -d "$(TOOLOPTDIR)" ]; then mv $(TOOLOPTDIR) $(TOOLOPTDIR).orig; fi @if [ -f "$(SESSIONRC)" ]; then mv $(SESSIONRC) $(SESSIONRC).orig; fi @if [ -f "$(TOOLRC)" ]; then mv $(TOOLRC) $(TOOLRC).orig; fi @cp -r brushes $(INSTALLDIR) @cp -r palettes $(INSTALLDIR) @cp -r tool-options $(INSTALLDIR) @cp sessionrc $(INSTALLDIR) @cp toolrc $(INSTALLDIR) @echo "Installation complete." restore: @echo "Restoring previous installation (if possible)" @if [ -d "$(BRUSHDIR).orig" ]; then rm -rf $(BRUSHDIR); mv $(BRUSHDIR).orig $(BRUSHDIR); fi @if [ -d "$(PALETTEDIR).orig" ]; then rm -rf $(PALETTEDIR); mv $(PALETTEDIR).orig $(PALETTEDIR); fi @if [ -d "$(TOOLOPTDIR).orig" ]; then rm -rf $(TOOLOPTDIR); mv $(TOOLOPTDIR).orig $(TOOLOPTDIR); fi @if [ -f "$(SESSIONRC).orig" ]; then rm $(SESSIONRC); mv $(SESSIONRC).orig $(SESSIONRC); fi @if [ -f "$(TOOLRC).orig" ]; then rm $(TOOLRC); mv $(TOOLRC).orig $(TOOLRC); fi @echo "Restoration (as much as possible) complete."