I wonder what adjustment should be made to the ignore list.

-ernie

On 10/6/22 1:01 AM, Michael Bien wrote:
thanks for sharing Ernie. Already updated my group using the script (adjusted the paths first obv.). Worked great!

it lists 840 projects, I remember a similar number from my old nb-all group which means it wasn't too much out of date yet :)

-mbien

On 05.10.22 04:41, Ernie Rael wrote:
Inspired by @mbien to setup for doing some jackpot (declarative refactoring) across all of NetBeans, I used two scripts to set up a project group with all the projects. Here they are in case someone might find them useful. They don't find gradle or maven projects (AFAIK). Run them like the following, given there's a nb-all group and you're in the directory

<userdir>/config/Preferences/org/netbeans/modules/projectui/groups/

then do

   bash findproj | bash fixgroup nb-all.properties

When done there'll be a nb-all.properties.bak file. You can run the commands separately, for example to diff the list to a previous list.

-ernie

======= findproj

nb_parent=/ref/nb/src

set -e

Main() {
    cd $nb_parent
    find netbeans -type d -name nbproject \
        | grep -E -v "$(ignore_these)" \
        | sed -e 's/[^/]*$//' \
        | sort
}

ignore_these() {
    local zap="
        /test/
        /iDeviceNativeBinding/
        /libs.nbi.ant/
        /csl.api/anttask/
        /dlight.nativeexecution/tools/
        /javafx2.samples/
        /installer/
        /sample_src/
        /javafx2.samples/
        /java.examples/
        /copylibstask/
        /nbbuild/
        /nbi/engine/
        /nbi/infra/
        /samples_src/
        /languages.antlr/
        /javawebstart/
        /performance/
        /php.samples/
        /CordovaMapsSample/
        /cordovaprojectupdate/
        /ide/bcutil/
        /ide/libs.tomlj
        /ide/libs.truffleapi/
        /ide/libs.xerces/
        /classfile/closure/
        "
    local result=$(printf "|%s" $zap)
    # strip the leading '|'
    echo "${result:1}"
}

Main

======= fixgroup

group=$1
nb_parent=/ref/nb/src

set -e

mv $group $group.bak
grep -v '^path=' $group.bak > $group

{
    echo -n "path="
    while read proj; do echo -n "file:$nb_parent/$proj "; done
    echo
} >> $group


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists






---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Reply via email to