in reply to Installing wxPerl 0.9923 with wxWidgets 3.0.1 on Unbuntu 14.04LTS 64bit

I think that a couple of improvements can be made there.

First of all,

find /usr | grep -i wx | grep -v -i python | grep -v -i soffice > rm_w +x.sh # | Collect wx files. Exclude wxpython, and soffice files sed -i -e 's/\/usr\//rm -rf \/usr\//g' rm_wx.sh
This looks scary and will break the packages installed in the system. For example, wxmaxima, a frontend to a symbolic calculation system written in LISP, will be deleted (but the package will be still marked installed). MCabber, a jabber client not related to Perl or Wx in any way, is going to get damaged, too. Manual cleanups should be done only in /usr/local; other parts of /usr belong to dpkg. Perhaps feeding the output of the command to dpkg -S and removing the packages it finds is a better idea, but you still need a way to filter the package names which should not be deleted (perhaps removing only packages with names matching 'lib*' will help for a start?).

Also, you can save on the child processes by using find expressions instead of grep: find /usr -iwholename '*wx*' \! \( -iwholename '*python*' -o -iwholename '*soffice' \) should produce the same output (and you can also use -iname instead of -iwholename to filter file names only).

Another two relatively unimportant things are that you ask the users to create a Perl directory in their ~, but don't use it much and download wxPerl and Alien-wxWidgets in the ~ instead and that you can save a lot of time on apt-get startup if you merge all apt-get install commands into one.

Replies are listed 'Best First'.
Re^2: Installing wxPerl 0.9923 with wxWidgets 3.0.1 on Unbuntu 14.04LTS 64bit
by jmlynesjr (Deacon) on Oct 19, 2014 at 00:26 UTC

    aitap:

    Thank you for your reply. I'll get back to the original author and see if we can improve the find section. The rm_wx.sh script is saved, so I will take a look and see what was deleted unintentionally. The cleanup commands would not be needed for a new install. For me, it was visually easier to keep the apt-get commands separate as I was merging several scripts and cross checking between them to make sure I didn't miss anything. The Perl directory is where I put the install script and other install files. The user is free to customize to their installation.

    James

    There's never enough time to do it right, but always enough time to do it over...