forked from afarhan/sbitx
-
-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathbootlogoinstall
More file actions
31 lines (26 loc) · 787 Bytes
/
bootlogoinstall
File metadata and controls
31 lines (26 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
SOURCE="/home/pi/sbitx/splash.png"
DESTINATION="/usr/share/plymouth/themes/pix/splash.png"
if [ ! -f "$SOURCE" ]; then
echo "Source file $SOURCE does not exist. Aborting."
exit 1
fi
if [ -f "$DESTINATION" ]; then
echo "Backing up the existing splash image."
sudo cp "$DESTINATION" "${DESTINATION}.bak"
if [ $? -ne 0 ]; then
echo "Failed to back up the existing splash image. Aborting."
exit 1
fi
else
echo "No existing splash image found at $DESTINATION."
fi
echo "Replacing splash image with the new one."
sudo cp "$SOURCE" "$DESTINATION"
if [ $? -eq 0 ]; then
echo "Splash image replaced successfully."
else
echo "Failed to replace the splash image. Aborting."
exit 1
fi
echo "Operation completed successfully!"