Updated location of easetup.sh and upgraded it for CentOS compatibility
Disclaimer: not tested on CentOS
This commit is contained in:
parent
f4e98b9ea1
commit
6f6c7f53a8
@ -22,7 +22,7 @@ rsync -auP ~/MEGAsync/backups/createarchive.sh $dotfiles/backups
|
|||||||
|
|
||||||
rsync -auP ~/MEGAsync/fedora-backup/fedora-setup/fedora-setup.sh $dotfiles/setup-env
|
rsync -auP ~/MEGAsync/fedora-backup/fedora-setup/fedora-setup.sh $dotfiles/setup-env
|
||||||
rsync -auP ~/MEGAsync/fedora-backup/fedora-setup/deploy-dotfiles.sh $dotfiles/setup-env
|
rsync -auP ~/MEGAsync/fedora-backup/fedora-setup/deploy-dotfiles.sh $dotfiles/setup-env
|
||||||
rsync -auP ~/MEGAsync/EASetup.sh $dotfiles/setup-env
|
rsync -auP ~/MEGAsync/fedora-backup/fedora-setup/EASetup.sh $dotfiles/setup-env
|
||||||
|
|
||||||
|
|
||||||
#rsync -auP ~/.config/openbox/autostart $dotfiles/config/openbox
|
#rsync -auP ~/.config/openbox/autostart $dotfiles/config/openbox
|
||||||
|
@ -56,6 +56,7 @@ unsetVars() {
|
|||||||
unset DONE
|
unset DONE
|
||||||
unset OVER
|
unset OVER
|
||||||
unset NP_USR
|
unset NP_USR
|
||||||
|
unset pkgmgr
|
||||||
}
|
}
|
||||||
|
|
||||||
introduction() {
|
introduction() {
|
||||||
@ -80,43 +81,53 @@ introduction() {
|
|||||||
# first, let's check it's Fedora we're running on...
|
# first, let's check it's Fedora we're running on...
|
||||||
isFedora() {
|
isFedora() {
|
||||||
local relll="/etc/redhat-release"
|
local relll="/etc/redhat-release"
|
||||||
echo -e " ${INFO} checking platform..."
|
if [ ! -f "$relll" ]; then
|
||||||
|
echo -e " ${CROSS} only ${COL_LIGHT_BLUE}Fedora/CentOS are supported${COL_NC} at the moment, exiting..."
|
||||||
if grep -iq 'fedora' $relll ; then
|
unsetVars && exit 9807362
|
||||||
echo -e " ${TICK} neat. working on a ${COL_PURPLE}$(cat $relll) ${COL_NC} [hint: supported]"
|
|
||||||
echo -e " ${INFO} some more detail `uname -a`" #cat /proc/version also poss
|
|
||||||
# maybe test on centos later
|
|
||||||
#elif grep -iq 'centos' /etc/redhat-release; then
|
|
||||||
echo
|
|
||||||
else
|
|
||||||
echo -e " ${CROSS} only ${COL_LIGHT_BLUE}Fedora is supported${COL_NC} at the moment, exiting..."
|
|
||||||
unsetVars && exit 9807362
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo -e " ${INFO} checking platform..."
|
||||||
|
# centos not tested
|
||||||
|
#if [ (grep -iq 'fedora' $relll) || (grep -iq 'centos' $relll) ]; then
|
||||||
|
echo -e " ${TICK} neat. working on a ${COL_PURPLE}$(cat $relll) ${COL_NC} [hint: supported]"
|
||||||
|
echo -e " ${INFO} some more detail about you" #cat /proc/version also possible
|
||||||
|
echo " kernel: v`uname -r`"
|
||||||
|
echo " platform: `uname -i`"
|
||||||
|
echo "`command free -m | head -2`"
|
||||||
|
#fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wineRepos() {
|
wineRepos() {
|
||||||
if grep -iq 'wine:/fedora' /etc/yum.repos.d/* ;then
|
if grep -iq 'winehq.org/wine-builds' /etc/yum.repos.d/* ;then
|
||||||
echo -e " ${TICK} winehq repository already registered, skipping"
|
echo -e " ${TICK} winehq repository already registered, skipping"
|
||||||
echo
|
echo
|
||||||
else
|
else
|
||||||
echo -e " ${INFO} registering a winehq repository"
|
echo -e " ${INFO} registering a winehq repository"
|
||||||
dnf config-manager --add-repo https://download.opensuse.org/repositories/Emulators:/Wine:/Fedora/Fedora_29_standard/Emulators:Wine:Fedora.repo
|
fi
|
||||||
if [ `echo $?` -ne 0 ]; then
|
if grep -iq 'fedora' $relll ; then
|
||||||
echo -e " ${CROSS} failed to register winehq repository, aborting..."
|
export pkgmgr=dnf
|
||||||
unsetVars && exit 1
|
$pkgmgr clean all
|
||||||
else
|
$pkgmgr config-manager --add-repo https://dl.winehq.org/wine-builds/fedora/30/winehq.repo
|
||||||
echo -e " ${TICK} winehq repository successfully registered"
|
elif grep -iq 'centos' $relll ; then
|
||||||
echo
|
export pkgmgr=yum
|
||||||
fi
|
yum clean metadata
|
||||||
fi
|
rpm -Uhv https://dl.winehq.org/wine-builds/fedora/30/winehq.repo
|
||||||
|
fi
|
||||||
|
if [ `echo $?` -ne 0 ]; then
|
||||||
|
echo -e " ${CROSS} failed to register winehq repository, aborting..."
|
||||||
|
unsetVars && exit 1
|
||||||
|
else
|
||||||
|
echo -e " ${TICK} winehq repository successfully registered"
|
||||||
|
echo
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
upgradePkgCache() {
|
upgradePkgCache() {
|
||||||
local str="refreshing pkg cache"
|
local str="refreshing pkg cache"
|
||||||
echo -e " ${INFO} ${str}"
|
echo -e " ${INFO} ${str}"
|
||||||
dnf upgrade -y --refresh > /dev/null 2>&1 || dilemmaFailedPkgCacheUpgrade
|
$pkgmgr -y upgrade > /dev/null 2>&1 || dilemmaFailedPkgCacheUpgrade
|
||||||
echo -e " ${TICK} pkg cache refreshed"
|
echo -e " ${TICK} pkg cache refreshed"
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
@ -147,7 +158,7 @@ wineAndFonts() {
|
|||||||
echo -e " ${TICK} winehq-devel is already installed, skipping"
|
echo -e " ${TICK} winehq-devel is already installed, skipping"
|
||||||
else
|
else
|
||||||
echo -e " ${INFO} not installed, so installing winehq-devel"
|
echo -e " ${INFO} not installed, so installing winehq-devel"
|
||||||
dnf install -y winehq-devel > /dev/null 2>&1
|
$pkgmgr -y install winehq-devel > /dev/null 2>&1
|
||||||
if [ `echo $?` -ne 0 ]; then
|
if [ `echo $?` -ne 0 ]; then
|
||||||
echo -e " ${CROSS} failed to install winehq-devel, aborting..."
|
echo -e " ${CROSS} failed to install winehq-devel, aborting..."
|
||||||
echo -e " we would not have much fun without that pkg either..."
|
echo -e " we would not have much fun without that pkg either..."
|
||||||
@ -162,7 +173,7 @@ wineAndFonts() {
|
|||||||
echo
|
echo
|
||||||
else
|
else
|
||||||
echo -e " ${INFO} not installed, so installing texlive-carlito (ea compat font)"
|
echo -e " ${INFO} not installed, so installing texlive-carlito (ea compat font)"
|
||||||
dnf install -y texlive-carlito > /dev/null 2>&1
|
$pkgmgr -y install texlive-carlito > /dev/null 2>&1
|
||||||
if [ `echo $?` -ne 0 ]; then
|
if [ `echo $?` -ne 0 ]; then
|
||||||
echo -e " ${CROSS} failed to install compat font, aborting... \n fonts for win\$hit could be an issue"
|
echo -e " ${CROSS} failed to install compat font, aborting... \n fonts for win\$hit could be an issue"
|
||||||
unsetVars && exit 1
|
unsetVars && exit 1
|
||||||
@ -457,7 +468,7 @@ goodbye() {
|
|||||||
echo -e " ${TICK} you should be all set now"
|
echo -e " ${TICK} you should be all set now"
|
||||||
echo -e " ${DONE}"
|
echo -e " ${DONE}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
setVars
|
setVars
|
||||||
@ -475,7 +486,6 @@ main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
main
|
main
|
||||||
echo
|
|
||||||
|
|
||||||
# some docs
|
# some docs
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user