The .install script in this package is an abomination and should never have been uploaded to the internet as is.
-
Don't use sudo in .install scripts, the sudo package is potentially not even installed on the target system and the scripts run under UID 0 anyway.
-
The remove_pt() in pre_install() stuff belongs either in the PKGBUILD or should be removed since it's not used anywhere in the script. Why should these files not be tracked by pacman?
-
Updating the various icon/desktop/mime DBs and caches should be left to the libalpm hooks that provide these binaries, it doesn't belong here.
-
Editing files that or owned by other packages is a big NO! NO!, you do not simply mangle /etc/profile, this has to go away. We have /etc/profile.d for this exact reason or alternatively communicate to the user that they have to set them manually in their configs.
Pinned Comments
runnytu commented on 2020-01-04 16:58 (UTC) (edited on 2020-01-04 16:59 (UTC) by runnytu)
To install all versions of packettracer except 7.2.2, follow this guidelines: 1. Download the snapshot from this AUR. 2. Tar -zxf the packettracer.tar.gz snapshot (it creates the dir packettracer/ with the PKGBUILD on it). 3. Download the latest packettracer tarball from your Netacad account and copy it into the packettracer/ dir. 4. Create the package with the command makepkg (it creates a packettracer.pkg.tar.xz). 5. Install the package with either makepkg -i or sudo pacman -U packettracer.pkg.tar.xz.
Packettracer 7.2.2 are auto installable via run file, download it from netacad webpage and run it, you don't need this package.