-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·77 lines (62 loc) · 2.36 KB
/
install.sh
File metadata and controls
executable file
·77 lines (62 loc) · 2.36 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/bash
if [ "$(which apt)" != "" ] &>/dev/null; then
package_manager="apt"
elif [ "$(which dnf)" != "" ] &>/dev/null; then
package_manager="dnf"
else
echo "Error: Package Manager Unsupported"
echo "Package Manager must be one of the following:"
echo "apt dnf"
exit
fi
echo "Special Modifacations by AspieSoft"
if test -f "./bin/falcon.txt" ; then
echo "$(cat ./bin/falcon.txt)"
else
echo
fi
echo "Installer"
echo
sudo echo
echo
echo "Installing..."
# origDir=$(dirname "$0")
cd "$HOME"
if [ "$package_manager" = "apt" ]; then
sudo apt -y install git &>/dev/null
elif [ "$package_manager" = "dnf" ]; then
sudo dnf -y install git &>/dev/null
fi
rm -rf SpecialModificationsForLinux
git clone -n --depth=1 --filter=tree:0 https://github.com/AspieSoft/SpecialModificationsForLinux.git &>/dev/null
cd SpecialModificationsForLinux
git sparse-checkout set --no-cone "/bin/common/" "/bin/scripts/main/" "/bin/scripts/$package_manager/" "/bin/falcon.txt" "/bin/printer-fix.png" "/readme.md" "/LICENSE" "/run.sh" &>/dev/null
git checkout master &>/dev/null
rm -rf .git
if ! test -f "$HOME/.bash_aliases" ; then
echo "" >> "$HOME/.bash_aliases"
fi
if ! sudo grep -q "# AspieSoft SpecialModifications Function" "$HOME/.bash_aliases" ; then
echo "" >> "$HOME/.bash_aliases"
echo "# AspieSoft SpecialModifications Function" >> "$HOME/.bash_aliases"
echo "function SpecialModifications() {" >> "$HOME/.bash_aliases"
echo ' cd "$HOME/SpecialModificationsForLinux"' >> "$HOME/.bash_aliases"
echo ' bash "$HOME/SpecialModificationsForLinux/run.sh"' >> "$HOME/.bash_aliases"
echo "}" >> "$HOME/.bash_aliases"
echo "" >> "$HOME/.bash_aliases"
fi
if ! test -d "$HOME/.bashrc.d" ; then
mkdir "$HOME/.bashrc.d"
fi
if ! test -f "$HOME/.bashrc.d/SpecialModifications" ; then
echo "" >> "$HOME/.bashrc.d/SpecialModifications"
echo "# AspieSoft SpecialModifications Function" >> "$HOME/.bashrc.d/SpecialModifications"
echo "function SpecialModifications() {" >> "$HOME/.bashrc.d/SpecialModifications"
echo ' cd "$HOME/SpecialModificationsForLinux"' >> "$HOME/.bashrc.d/SpecialModifications"
echo ' bash "$HOME/SpecialModificationsForLinux/run.sh"' >> "$HOME/.bashrc.d/SpecialModifications"
echo "}" >> "$HOME/.bashrc.d/SpecialModifications"
echo "" >> "$HOME/.bashrc.d/SpecialModifications"
fi
echo "SpecialModificationsForLinux" >> "$HOME/.hidden"
echo
bash "run.sh"