mirror of
https://github.com/RasppleII/a2cloud.git
synced 2025-02-20 03:29:03 +00:00
Plan to be able to use /usr/local/lib/raspple2 for other things, so moved the nulib2-version file to a pkginfo subdir. This gave me an excuse to create something I've wanted for awhile: A place to stick legacy code that fixes our mistakes that probably doesn't need to exist forever. I can count the number of people who downloaded 1f8afb6 on a few fingers of one hand most likely, but the change still got published and I can silently fix my mistake without having to stick mostly useless code in install_archive_tools someone's gonna look at three years from now and ask, "does that still need to be there?" No, no it doesn't. And fixup describes succinctly how long that code needs to remain there. And the fix is encapsulated into a nice little blob that's easily removed when the time comes.
40 lines
1.5 KiB
Bash
Executable File
40 lines
1.5 KiB
Bash
Executable File
#! /bin/bash
|
|
# vim: set tabstop=4 shiftwidth=4 noexpandtab filetype=sh:
|
|
|
|
# fixup - correct any mistakes from previous versions
|
|
#
|
|
# To the extent possible under law, T. Joseph Carter and Ivan Drucker have
|
|
# waived all copyright and related or neighboring rights to the a2cloud
|
|
# scripts themselves. Software used or installed by these scripts is subject
|
|
# to other licenses. This work is published from the United States.
|
|
|
|
# The idea behind this script is to prevent other scripts from becoming a
|
|
# minefield of ancient and deprecated code designed to compensate for other
|
|
# even more ancient and replaced code that is no longer needed, no longer
|
|
# useful, and honestly complicates maintenance of that code. Everything here
|
|
# will explain what it does, when it was put here, and it should remain clear
|
|
# when the legacy code may be removed.
|
|
#
|
|
# The use of functions which get immediately called is to try and prevent the
|
|
# long spidery conditional blocks a2cloud was originally known for.
|
|
|
|
# # Added 2000-00-00
|
|
# fix_some_stupid_mistake()
|
|
# {
|
|
# # Needed until: Upgrades from 0.0.0 no longer supported
|
|
# :
|
|
# }
|
|
# fix_some_stupid_mistake
|
|
|
|
# Added 2018-08-09
|
|
fix_nulib2_version_file_location()
|
|
{
|
|
# Needed while: Unreleased 1f8afb6 (2018-08-05) is in use by testers
|
|
local ras2_pkginfo="/usr/local/lib/raspple2/pkginfo"
|
|
if [[ -f /usr/local/lib/raspple2/nulib2-version ]]; then
|
|
sudo install -d -m 755 -o root -g root "$ras2_pkginfo"
|
|
sudo mv /usr/local/lib/raspple2/nulib2-version "$ras2_pkginfo"
|
|
fi
|
|
}
|
|
fix_nulib2_version_file_location
|