-
-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add auto install script for easy installation
fixes #185
- Loading branch information
1 parent
418f97e
commit 6bb1d9e
Showing
3 changed files
with
63 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
sysThemeNames=("'Pop'" "'Pop-dark'" "'Pop-light'" "'Yaru'" "'Yaru-dark'" "'Yaru-light'" "'Adwaita-maia'" "'Adwaita-maia-dark'") | ||
themeNames=("pop" "pop" "pop" "yaru" "yaru" "yaru" "maia" "maia") | ||
|
||
firefoxInstalationPaths=( | ||
~/.mozilla/firefox | ||
~/.var/app/org.mozilla.firefox/.mozilla/firefox | ||
) | ||
|
||
currentTheme=$(gsettings get org.gnome.desktop.interface gtk-theme ) || currentTheme="" | ||
installScript="./scripts/install.sh" | ||
themeArg="" | ||
folderArg="" | ||
foldersFoundCount=0 | ||
|
||
eval "chmod +x ${installScript}" | ||
|
||
for i in "${!sysThemeNames[@]}"; do | ||
if [[ "${sysThemeNames[$i]}" = "${currentTheme}" ]]; then | ||
themeArg=" -t ${themeNames[i]}" | ||
fi | ||
done | ||
|
||
for folder in "${firefoxInstalationPaths[@]}"; do | ||
if [ -d $folder ]; then | ||
echo Firefox installation folder found | ||
|
||
folderArg=" -f $folder" | ||
eval ${installScript}${themeArg}${folderArg} | ||
foldersFoundCount+=1 | ||
|
||
fi | ||
|
||
done | ||
|
||
if [ $foldersFoundCount = 0 ];then | ||
echo No firefox folder found ; | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters