Make updating firefox config optional
This commit is contained in:
parent
6a0dfeba25
commit
1bde1df151
@ -76,14 +76,19 @@ fi
|
|||||||
#### Arguments ####
|
#### Arguments ####
|
||||||
####################
|
####################
|
||||||
|
|
||||||
|
copy_firefox=0
|
||||||
|
|
||||||
# handle arguments
|
# handle arguments
|
||||||
if [[ "$#" -eq 1 ]]; then
|
if [[ "$#" -eq 1 ]]; then
|
||||||
# -t/--theme to change theme
|
# -t/--theme to change theme
|
||||||
if [[ "$1" == "-t" || "$1" == "--theme" ]]; then
|
if [[ "$1" == "-t" || "$1" == "--theme" ]]; then
|
||||||
func_seltheme
|
func_seltheme
|
||||||
|
elif [[ "$1" == "-f" || "$1" == "--firefox" ]]; then
|
||||||
|
copy_firefox=1
|
||||||
elif [[ "$1" == "-h" || "$1" == "--help" ]]; then
|
elif [[ "$1" == "-h" || "$1" == "--help" ]]; then
|
||||||
echo "-h, --help Show help menu"
|
echo "-h, --help Show help menu"
|
||||||
echo "-t, --theme Show theme selection screen"
|
echo "-t, --theme Show theme selection screen"
|
||||||
|
echo "-f, --firefox Update firefox config"
|
||||||
fi
|
fi
|
||||||
elif [[ "$#" -gt 1 ]]; then
|
elif [[ "$#" -gt 1 ]]; then
|
||||||
echo "Too many arguments"
|
echo "Too many arguments"
|
||||||
@ -229,17 +234,22 @@ cp -r ~/configs/arch-config/.local/ ~/
|
|||||||
#cp -r ~/config/.elvish ~/
|
#cp -r ~/config/.elvish ~/
|
||||||
cp -r ~/configs/arch-config/.doom.d ~/
|
cp -r ~/configs/arch-config/.doom.d ~/
|
||||||
cp -r ~/configs/arch-config/.ssh ~/
|
cp -r ~/configs/arch-config/.ssh ~/
|
||||||
if [[ -d ~/.mozilla/firefox ]]; then
|
|
||||||
# NOTE check if firefox default-release directory exists. 1 is good, 0 is bad
|
# copy firefox only if "-f" or "--firefox" is given as argument
|
||||||
firefoxdir=$(find ~/.mozilla/firefox/ -name \*.default-release | wc -l)
|
if [[ copy_firefox -eq 1 ]]; then
|
||||||
if [[ $firefoxdir -eq 1 ]]; then
|
if [[ -d ~/.mozilla/firefox ]]; then
|
||||||
cp -r ~/config/.mozilla/firefox/default-release/* ~/.mozilla/firefox/*.default-release/
|
# NOTE check if firefox default-release directory exists. 1 is good, 0 is bad
|
||||||
|
firefoxdir=$(find ~/.mozilla/firefox/ -name \*.default-release | wc -l)
|
||||||
|
if [[ $firefoxdir -eq 1 ]]; then
|
||||||
|
cp -r ~/config/.mozilla/firefox/default-release/* ~/.mozilla/firefox/*.default-release/
|
||||||
|
else
|
||||||
|
echo "Please launch firefox and then update the config again"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "Please launch firefox and then update the config again"
|
echo "Please launch firefox and then update the config again"
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo "Please launch firefox and then update the config again"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo Copied folders
|
echo Copied folders
|
||||||
|
|
||||||
#copy single files
|
#copy single files
|
||||||
|
Loading…
Reference in New Issue
Block a user