From 87cacc5273517be011dbd5931ee57af79f34c3c1 Mon Sep 17 00:00:00 2001
From: Kubat <mael.martin31@gmail.com>
Date: Sun, 14 Nov 2021 15:39:21 +0100
Subject: [PATCH] Add the README file and the install script

---
 README.md  | 25 +++++++++++++++++++++++++
 install.sh | 18 ++++++++++++++++++
 2 files changed, 43 insertions(+)
 create mode 100644 README.md
 create mode 100755 install.sh

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..67127de
--- /dev/null
+++ b/README.md
@@ -0,0 +1,25 @@
+# ARISE plymouth theme
+
+## Installation instructions
+- Un-tar the archive or git clone the repository
+  ```bash
+  tar xvf arise-theme.tar
+  ```
+- Copy the content of the folder into plymouth's data folder as root:
+  ```bash
+  chmod +x install.sh
+  sudo ./install.sh
+  ```
+- Update the alternatives, when prompted select the `arise-theme` option:
+  ```bash
+  sudo update-alternatives --config default.plymouth
+  # Here select the arise-theme plymouth theme
+  ```
+- Then update the initramfs
+  ```bash
+  sudo update-initramfs -u
+  ```
+
+## Update instructions
+
+Just untar the new `arise-theme.tar` or pull from the repo then re-run the `install.sh` script.
\ No newline at end of file
diff --git a/install.sh b/install.sh
new file mode 100755
index 0000000..5d4bb95
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+INSTALL_FILES="animation.png arise-theme.plymouth arise-theme.script background.png box.png bullet.png entry.png install.sh lock.png logo.png motif.png progress_bar.png progress_box.png progress_box_background.png progress_box_edge.png suspend.png"
+INSTALL_FOLDER="/use/share/plymouth/themes"
+THEME_FOLDER="$INSTALL_FOLDER/arise-theme"
+
+function die() {
+    echo "$*"
+    exit 1
+}
+
+mkdir -p "$THEME_FOLDER" || die "Failed to create folder $THEME_FOLDER"
+for FILE in $INSTALL_FILES
+do
+    cp "$FILE" "$THEME_FOLDER/$FILE" || die "Failed to copy file $FILE into $THEME_FOLDER"
+done
+
+update-alternatives --install "$INSTALL_FOLDER/default.plymouth" default.plymouth "$THEME_FOLDER/arise-theme.plymouth" 100
\ No newline at end of file
-- 
GitLab