Skip to content

Instantly share code, notes, and snippets.

View Zejnilovic's full-sized avatar

Saša Zejnilović Zejnilovic

View GitHub Profile
@Zejnilovic
Zejnilovic / switch_m2_settings.pl
Created May 3, 2019 05:48
Script to easily switch between settings files - written for maven, easily changeable to support others.
#!/usr/bin/perl
# Perl script to fast switch between maven settings. Applicable to other programs as well.
# Expects an original file like settings.xml and reference files like settings.xml.alfa1
# and settings.xml.alfa2. These are in the same $m2Folder. When run gives user list of
# postfixes of the original file to chose from (alfa1, alfa2). And that file will
# overwrite the original settings.xml
use warnings;
use File::Copy;