Skip to content
This repository was archived by the owner on Sep 15, 2023. It is now read-only.

Commit

Permalink
Feat: sample script for cleanstall and install in Netbeans
Browse files Browse the repository at this point in the history
  • Loading branch information
L1nc0ln committed Jun 28, 2022
1 parent ce723db commit aecb8cb
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/sh

####################################################################################################################################################
####################################################################################################################################################
#### ####
#### This script runs the maven clean install and then moves the jar file and the folder with ####
#### the dependencies to the location where the installed plugins normally reside in the userdir ####
#### of the designer. This means no manual uninstall and install via the plugins window of the designer ####
#### ####
####################################################################################################################################################
####################################################################################################################################################

# name of the jar file to be moved. Example of the git plugin:
# jarFile="de-adito-git-adito-nbm-git.jar"
jarFile="de-adito-git-adito-nbm-git.jar"
# path to the jar file above, from the location of this script. Example of the git plugin (Note that the git plugin builds the nbm in a submodule,
# path probably starts with target/...):
# jarPath="nbm/target/nbm/netbeans/extra/modules/"
jarPath="nbm/target/nbm/netbeans/extra/modules/"
# the path to the folder in which the jar should be moved. Example of the git plugin:
# jarTargetPath="../0.0/workingdir/nbp_userdir/modules/"
jarTargetPath="../0.0/workingdir/nbp_userdir/modules/"
# name of the folder that contains the gathered dependencies of the plugin. These have to be moved as well. Example of the git plugin:
# folderName="de.adito.git.adito-nbm-git/"
folderName="de.adito.git.adito-nbm-git/"
# path to the folder containing the gathered dependencies, as seen from the location of the script. Example of the git plugin:
# folderPath="nbm/target/nbm/netbeans/extra/modules/ext/"
folderPath="nbm/target/nbm/netbeans/extra/modules/ext/"

if test -z "$jarFile" || test -z "$jarPath" || test -z "$jarTargetPath" || test -z "$folderName" || test -z "$folderPath"; then
echo "Variables for the file paths not set up, aborting the job. Please fill in the variables in the script"

else
targetPathFolder="ext/"
jarFilePath=$jarPath$jarFile
jarFileTargetPath=$jarTargetPath$jarFile
folderNamePath=$folderPath$folderName
folderTargetPath=$jarTargetPath$targetPathFolder

JAVA_HOME="/usr/lib/jdk-13.0.2/" mvn clean install -Dmaven.test.skip=true -T 1C -P adito.m2

cp $jarFilePath $jarFileTargetPath
if test -d $folderNamePath; then
cp -r $folderNamePath $folderTargetPath
fi

fi

0 comments on commit aecb8cb

Please sign in to comment.