Making File and Folders Hidden in Install4j and replace installer variable action related query - replace

Is there is any way to make files/folders hidden during or install files action in install4j.
Like similar to .install4j folder in Installation folder.I am working on CentOS platform.
When install4j action replaces installer variables in files those are replaced as it is in text format,is there is any way to replace encrypted values or hide those replaced variables in shell script as it might contain sensitive information.

As of install4j 8, there is no action to make files hidden
Call context.registerHiddenVariable("<variable name>") in a script to tell install4j that an installer variable contains sensitive information. Its contents will not be written to the log file.

Related

Using regex in FTP for filenames for downloading files

Is it possible to use regex for matching file names in FTP to get files from server ?
I need to do FTP to server and need to download the files whose file names are ending with the same value. In my case, it is 14_04_25_144238.
I am not sure if it is doable. But, just out of curiosity, asking this.
Can we use regex like .*14_04_25_144238 in the ftp get command ?
Thanks in advance.
Dinesh S
You want the mget command.
From the Unix man page
mget remote-files
Expand the remote-files on the remote machine and
do a get for each file name thus produced. See glob for details on
the filename expansion. Resulting file names will then be
processed according to case, ntrans, and nmap settings. Files are
transferred into the local working directory, which can be changed
with 'lcd directory'; new local directories can be created with '!
mkdir directory'.
If you want to turn of the prompting of each file, then you also need this:
prompt
Toggle interactive prompting. Interactive prompting occurs
during multiple file transfers to allow the user to selectively retrieve or store files. If prompting is turned off (default is on), any mget or mput will transfer all files, and any
mdelete will delete all files
.

Running NotePad++ from Command line with Compare Plugin showing compare result

I am trying to find a way to call notepad++ from command line with compare plugin showing the compare result providing I pass 2 files name which I want to compare.
Think like I have a batch file, which does some work and result is opening notepad++ showing 2 files in compare mode. (Yes, compare plugin is installed)
If anyone has any other suggestion to using any other editor or software also welcome..
tl;dr:
The command is Notepad++\plugins\ComparePlugin\compare.exe file1 file2.
Details:
Download the compare plugin https://bitbucket.org/uph0/compare/downloads/ComparePlugin.v1.5.6.6.bin.zip. Installing the compare plugin from the plugin manager within Notepad++ does not install the requisite exe. I assume you could also build from source to obtain the exe.
Follow the manual installation instructions in the readme:
To install manually, copy ComparePlugin.dll and ComparePlugin subfolder
into the plugins directory C:\Program Files\Notepad++\Plugins.
For a portable Notepad++ installation, you need to run the command from a directory above the notepad++ directory (or with absolute path of exe), otherwise you get an error that Notepad++.exe is not found.
The commands look like this:
>cd C:\portapps\Notepad++
>cd ..
>Notepad++\plugins\ComparePlugin\compare.exe C:\files\file1.txt C:\files\file2.txt
ufo's answer put me on the right track but it did not contain the commands to run.
There's a tool called NppCompareLoader doing exactly what you want. Simply drop it in the N++ installation folder. I'm using it since many years as a diff viewer for TortoiseSVN and TortoiseGit, thus you should certainly be able to call it right from command line.
/EDIT
Since the (unofficial) Compare-plug-in version 1.5.6.6 the additional loader mentioned above isn't required anymore. There's already one included in the plug-in. Here's the regarding change-log fragment:
NEW: Loader for using N++ as an external diff viewer (e.g. in TortoiseSVN, TortoiseGit, ..)

Sublime Text 2 FileTemplates plugin doesn't work

I want to use "FileTemplates" plugin in Sublime Text 2. I installed it with Package Controller, but when I use "Create file from template" and select something, nothing happens! It doesn't even create a file.
How can I make it work? Any ideas?
You need to find you current user's packages folder. Here you will find where the FileTemplates package has been installed. On my Windows system it is %APPDATA%\Roaming\Sublime Text 2\Packages\FileTemplates. You may also get to this folder from the Preferences menu by selecting Browse Packages...
Inside this folder there is a Templates folder. Inside this folder you will find the pre-canned file templates. You may create your own by copying and pasting the existing files to create the templates you like. You will need to create a .file-template file in the FileTemplates folder. This file is an xml file which tells sublime where to find the actual template and what parameters to the file creation the user may pass into the template. For instance $name is the parameter that the user is prompted for which will be used to name the file created from the template. Hope this helps.

Excluding a single project file from an SVN repository

I have a django project that I have been working on as a solo developer, and have been using TortoiseSVN to keep the code managed in a repository on a work server. I work on this on a local installation of django etc.
There is now a second person who will be working on this project, and the possibility of working on some other PCs.
Now, there should, for the time being, only be one development version (branch?) of this project, but the configuration file (settings.py) will need to be different on each computer that is being used. I want to create one local version of this file on each PC which should not need to be changed again.
How can I set the repository (preferably within TortoiseSVN) to exclude this one file? E.g. the repository should not include settings.py. When a checkout occurs, it should update all files in the local folder but not change/remove the local copy of settings.py. When a commit occurs, settings.py should be ignored and not uploaded.
At the moment settings.py is overwritten/updated as per any other file in the project folder/repository.
Any nudges in the right direction would be useful - I'm new to SVN generally and would like to know if this is something that's going to need detailed understanding of branching or if there is a simpler way.
Thanks
In TortoiseSVN, when you try to commit your files, in the file list dialog, right click the file and look for the Ignore option. You can ignore by complete filename or extension.
If the file is already in the repository, and you want to remove it from there and ignore it, you can simply right-click the file and in the TortoiseSVN menu look for the 'Delete and add to ignore list' option.
You'll be looking for the svn:ignore property, which tells subversion to not version files matching a pattern or patterns you specify.
There's some guidance on using it with TortoiseSVN at:
http://arcware.net/tortoisesvn-global-ignore-pattern-vs-svn-ignore/
These should help:
I have a file in my project that every developer must change, but I don't want those local mods to ever be committed. How can I make 'svn commit' ignore the file?
Excluding Items from the Commit List
The typical solution is to do what bgever said and ignore the settings file itself, and then commit a file with example values, something like settings.py.example. That file should only be updated when you add or remove settings. When deploying, you'd copy that to settings.py and edit the values.

How to get last build label in text file

I have one project which is under Cruise control.
I want to write one console application which will write the last build label of that project in one text file.
CruiseControl passes CCNetLabel argument to script that it invokes. You can just print this out to a file from the script without writing a console application.
If you need to retrieve project version from outside of the CruiseControl, then you can either access this file (i.e.: by exposing it via IIS) or poll and parse XML report of CruiseControl dashboard (which is located at http://BuildServer/XmlServerReport.aspx)
Depends on what flavour of cruisecontrol you use ? For default, java version, i have something like this
<schedule showProgress="true">
<composite showProgress="true">
<exec timeout="2400" command="${homedir}/bin/updatebuildid" args="${sbhomedir}/projects/${project.name} ${label}"/>
..... etc ..
And updatebuild script is basicly a shellscript for invoking sed to add a postfix to a version number in the packaging files. for you it could be just simple "echo $1 > $yourfile"