-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstaller.sh
More file actions
executable file
·47 lines (40 loc) · 1.45 KB
/
Copy pathinstaller.sh
File metadata and controls
executable file
·47 lines (40 loc) · 1.45 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
FASTFETCH_DIR="/home/$USER/.config/fastfetch"
if ! [[ -d "$FASTFETCH_DIR" ]]; then
echo "Creating Fastfetch directory..."
mkdir -p "$FASTFETCH_DIR"
else
echo "Fastfetch directory already exists."
echo "Backing up existing Fastfetch configuration files..."
a=$(date +%Y%m%d_%H%M%S)
mkdir -p "$FASTFETCH_DIR/backup_$a"
cp -r "$FASTFETCH_DIR/*" "${FASTFETCH_DIR}_backup_${a}/"
echo "Backup completed."
fi
echo "Copying Fastfetch configuration files..."
cp -r ./fastfetch/* "$FASTFETCH_DIR/"
read -p "Do you want to download additional anime fastfetch images? (y/N): " choice
if [[ "$choice" == "y" || "$choice" == "Y" ]]; then
echo "Downloading additional anime fastfetch images..."
git clone https://github.com/thunder-blaze/FastfetchPngs.git /tmp/FastfetchPngs --depth 1
mkdir -p "$FASTFETCH_DIR/pngs"
cp -rf /tmp/FastfetchPngs/* "$FASTFETCH_DIR/pngs/"
fi
echo "Fastfetch configuration files copied successfully."
echo "Initializing Fastfetch Script..."
if [[ -x "$FASTFETCH_DIR/tsukiyomi-fetch" ]]; then
"$FASTFETCH_DIR/tsukiyomi-fetch" --setup
else
echo "Error: tsukiyomi-fetch not found or not executable."
exit 1
fi
if [[ $? -e 0 ]]; then
echo "Fastfetch Script initialized successfully."
if [[ -d "/tmp/FastfetchPngs" ]]; then
echo "Cleaning up temporary files..."
rm -rf /tmp/FastfetchPngs
fi
else
echo "Error: Failed to initialize Fastfetch Script."
exit 1
fi