summarylogtreecommitdiffstats
path: root/celestia-addon-sun.install
diff options
context:
space:
mode:
Diffstat (limited to 'celestia-addon-sun.install')
-rw-r--r--celestia-addon-sun.install21
1 files changed, 21 insertions, 0 deletions
diff --git a/celestia-addon-sun.install b/celestia-addon-sun.install
new file mode 100644
index 000000000000..0c25b71c3ea2
--- /dev/null
+++ b/celestia-addon-sun.install
@@ -0,0 +1,21 @@
+
+post_install() {
+ echo "WARNING: This plugin overwrites the following Celestia file:"
+ echo "/usr/share/celestia/textures/medres/gstar.jpg"
+ echo "It will be restored from the gstar-original.jpg file"
+ echo "when you uninstall the celestia-addon-sun package."
+
+ mv --verbose "/usr/share/celestia/textures/medres/gstar.jpg" "/usr/share/celestia/textures/medres/gstar-original.jpg"
+ mv --verbose "/tmp/gstar.jpg" "/usr/share/celestia/textures/medres/"
+}
+
+post_upgrade() {
+ post_install
+}
+
+
+post_remove() {
+ echo "Restore the original Celestia file:"
+ echo "/usr/share/celestia/textures/medres/gstar.jpg"
+ mv --verbose "/usr/share/celestia/textures/medres/gstar-original.jpg" "/usr/share/celestia/textures/medres/gstar.jpg"
+}