Browse Source

Unify message layouts

master
Fincer 6 years ago
parent
commit
9331683d56
4 changed files with 32 additions and 31 deletions
  1. +8
    -8
      arch/updatewine_arch.sh
  2. +6
    -6
      debian/dxvkroot/dxvkbuild.sh
  3. +9
    -8
      debian/updatewine_debian.sh
  4. +9
    -9
      debian/wineroot/winebuild.sh

+ 8
- 8
arch/updatewine_arch.sh View File

@ -110,7 +110,7 @@ trap "Arch_intCleanup" INT
function ccacheCheck() {
if [[ $(pacman -Q | awk '{print $1}' | grep -wE "ccache" | wc -l) -eq 0 ]]; then
echo -e "NOTE: Please consider using 'ccache' for faster compilation times.\nInstall it by typing 'sudo pacman -S ccache'\n"
echo -e "\e[1mNOTE:\e[0m Please consider using 'ccache' for faster compilation times.\nInstall it by typing 'sudo pacman -S ccache'\n"
fi
}
@ -131,7 +131,7 @@ function checkFiles() {
for file in ${list[@]}; do
if [[ ! -f "${path}/${file}" ]]; then
echo -e "Could not locate file ${} for ${name}. Aborting\n"
echo -e "\e[1mERROR:\e[0m Could not locate file ${} for ${name}. Aborting\n"
exit 1
fi
done
@ -212,7 +212,7 @@ function checkDepends() {
if [[ $(printf $(pacman -Q ${pkg} &>/dev/null)$?) -ne 0 ]]; then
ERRPKGS[$l]=${pkg}
echo -e "\e[91mError:\e[0m Dependency '${pkg}' not found, required by '${package}' (${file} => ${var})"
echo -e "\e[91mERROR:\e[0m Dependency '${pkg}' not found, required by '${package}' (${file} => ${var})"
let l++
fi
@ -226,7 +226,7 @@ function checkDepends() {
function check_alldeps() {
if [[ -v ERRPKGS ]]; then
echo -e "The following dependencies are missing:\n\e[91m\
echo -e "\e[1mERROR:\e[0m The following dependencies are missing:\n\e[91m\
$(for o in ${ERRPKGS[@]}; do printf '%s\n' ${o}; done)\
\e[0m\n"
exit 1
@ -271,7 +271,7 @@ function check_gitOverride_wine() {
cd "${commit_dir}"
if [[ $? -ne 0 ]]; then
echo -e "Error: couldn't access Wine folder ${commit_dir} to check commits. Aborting\n"
echo -e "\e[1mERROR:\e[0m Couldn't access Wine folder ${commit_dir} to check commits. Aborting\n"
exit 1
fi
@ -285,7 +285,7 @@ function check_gitOverride_wine() {
done
if [[ $? -ne 0 ]]; then
echo -e "Error: couldn't parse Wine commits in ${commit_dir}. Aborting\n"
echo -e "\e[1mERROR:\e[0m Couldn't parse Wine commits in ${commit_dir}. Aborting\n"
exit 1
fi
@ -433,7 +433,7 @@ function build_pkg() {
done
else
echo -e "Error occured during ${pkgname} compilation.\n"
echo -e "\e[1mERROR:\e[0m Error occured during ${pkgname} compilation.\n"
for rml in ${cleanlist[*]}; do
rm -rf "${ARCH_BUILDROOT}/${pkgdir}/${rml}"
done
@ -544,6 +544,6 @@ fi
# Update user's PlayonLinux wine prefixes if needed
if [[ ! -v NO_POL ]]; then
echo -e "Updating your PlayOnLinux Wine prefixes.\n"
echo -e "\e[1mINFO:\e[0m Updating your PlayOnLinux Wine prefixes.\n"
updatePOL
fi

+ 6
- 6
debian/dxvkroot/dxvkbuild.sh View File

@ -251,7 +251,7 @@ function preparepackage() {
cd ${_pkgname}
git reset --hard ${_git_commithash}
if [[ $? -ne 0 ]]; then
echo -e "Error: couldn't find commit ${_git_commithash} for ${_pkgname}. Aborting\n"
echo -e "\e[1mERROR:\e[0m Couldn't find commit ${_git_commithash} for ${_pkgname}. Aborting\n"
exit 1
fi
_pkgver=$(eval "${_pkgver}")
@ -279,7 +279,7 @@ function preparepackage() {
mv ${_pkgname} ${_pkgname}-${_pkgver}
cd ${_pkgname}-${_pkgver}
else
echo -e "Error while downloading source of ${_pkgname} package. Aborting\n"
echo -e "\e[1mERROR:\e[0m Error while downloading source of ${_pkgname} package. Aborting\n"
exit 1
fi
@ -517,7 +517,7 @@ function dxvk_install_main() {
echo "${option}" | sudo update-alternatives --config "${package}" &> /dev/null
if [[ $? -ne 0 ]]; then
echo -e "Error occured while running 'update-alternatives' for '${package}'. Aborting\n"
echo -e "\e[1mERROR:\e[0m Error occured while running 'update-alternatives' for '${package}'. Aborting\n"
exit 1
fi
@ -539,7 +539,7 @@ function dxvk_install_main() {
# TODO Expecting just one folder here. This method doesn't work with multiple dirs present
if [[ $(echo ${dxvk_builddir_name} | wc -l) -gt 1 ]]; then
echo "Error: Multiple entries in dxvk build directory detected. Can't decide which one to use. Aborting\n"
echo "\e[1mERROR:\e[0m Multiple entries in dxvk build directory detected. Can't decide which one to use. Aborting\n"
exit 1
fi
@ -553,7 +553,7 @@ function dxvk_install_main() {
fi
if [[ $? -ne 0 ]]; then
echo -e "Error occured while applying DXVK patch '${pfile}'. Aborting\n"
echo -e "\e[1mERROR:\e[0m Error occured while applying DXVK patch '${pfile}'. Aborting\n"
cd ${CURDIR}
exit 1
fi
@ -603,7 +603,7 @@ DXVK-DEBIANRULES
bash ./package-release.sh master debian/source/ --no-package
if [[ $? -ne 0 ]]; then
echo -e "Error while compiling ${pkgname}. Check messages above. Aborting\n"
echo -e "\e[1mERROR:\e[0m Error while compiling ${pkgname}. Check messages above. Aborting\n"
buildpkg_removal
exit 1
fi


+ 9
- 8
debian/updatewine_debian.sh View File

@ -114,7 +114,7 @@ trap "Deb_intCleanup" INT
function ccacheCheck() {
if [[ $(echo $(dpkg -s ccache &>/dev/null)$?) -ne 0 ]]; then
echo -e "NOTE: Please consider installation of 'ccache' for faster compilation times if you compile repetitively.\nInstall it by typing 'sudo apt install ccache'\n"
echo -e "\e[1mNOTE:\e[0m Please consider installation of 'ccache' for faster compilation times if you compile repetitively.\nInstall it by typing 'sudo apt install ccache'\n"
fi
}
@ -161,13 +161,13 @@ function winetricks_install_main() {
# Winetricks already installed by the previous command
return 0
else
echo -e "Warning: can't install Winetricks from repositories. Trying to compile from source.\n"
echo -e "\e[1mWARNING:\e[0m Can't install Winetricks from repositories. Trying to compile from source.\n"
# TODO Force Winetricks compilation from source. Is this a good practice?
return 1
fi
else
# Multiple or no entries from apt-cache output. Can't decide which package to use, so force winetricks compilation.
echo -e "Warning: can't install Winetricks from repositories. Trying to compile from source.\n"
echo -e "\e[1mWARNING:\e[0m Can't install Winetricks from repositories. Trying to compile from source.\n"
# TODO Force Winetricks compilation from source. Is this a good practice?
return 1
fi
@ -207,7 +207,7 @@ function winetricks_install_main() {
if [[ $(echo $(dpkg -s ${tricksdep} &>/dev/null)$?) -ne 0 ]]; then
sudo apt install -y ${tricksdep}
if [[ $? -ne 0 ]]; then
echo -e "Error: couldn't install Winetricks dependency ${tricksdep}. Skipping Winetricks installation.\n"
echo -e "\e[1mERROR:\e[0m Couldn't install Winetricks dependency ${tricksdep}. Skipping Winetricks installation.\n"
# TODO revert installation of any installed 'tricksdep' installed on previous loop cycle
if [[ ! -v NO_INSTALL ]];then
echo -e "DXVK won't be installed\n"
@ -251,7 +251,7 @@ function winetricks_install_main() {
fi
mv ${pkgdebdir}/${pkg}*.deb ${pkgdebdir}/winetricks_old/
if [[ $? -ne 0 ]]; then
echo -e "Warning: couldn't move old Winetricks archives. Not installing Winetricks.\n"
echo -e "\e[1mWARNING:\e[0m Couldn't move old Winetricks archives. Not installing Winetricks.\n"
if [[ ! -v NO_INSTALL ]];then
echo -e "DXVK won't be installed\n"
# We can set this value because winetricks function is intented to be called
@ -271,7 +271,7 @@ function winetricks_install_main() {
sudo dpkg -i ${pkgdebdir}/${pkg}*.deb
if [[ $? -ne 0 ]]; then
echo -e "Warning: couldn't install Winetricks.\n"
echo -e "\e[1mWARNING:\e[0m Couldn't install Winetricks.\n"
if [[ ! -v NO_INSTALL ]];then
echo -e "DXVK won't be installed\n"
@ -285,7 +285,7 @@ function winetricks_install_main() {
return 1
fi
else
echo -e "Warning: couldn't compile Winetricks.\n"
echo -e "\e[1mWARNING:\e[0m Couldn't compile Winetricks.\n"
if [[ ! -v NO_INSTALL ]];then
echo -e "DXVK won't be installed\n"
# We can set this value because winetricks function is intented to be called
@ -479,11 +479,12 @@ fi
# If PlayOnLinux Wine prefixes are going to be updated, then
if [[ ! -v NO_POL ]]; then
echo -e "\e[1mINFO:\e[0m Updating your PlayOnLinux Wine prefixes.\n"
bash -c "cd ${ROOTDIR} && bash playonlinux_prefixupdate.sh"
fi
# If error occured during Winetricks script runtime, then
if [[ -v WINETRICKS_ERROR ]]; then
echo -e "Warning: couldn't compile or install Winetricks.\
echo -e "\e[1mWARNING:\e[0m Couldn't compile or install Winetricks.\
$(if [[ ! -v NO_DXVK ]]; then printf " DXVK installation may have failed, too."; fi)\n"
fi

+ 9
- 9
debian/wineroot/winebuild.sh View File

@ -300,7 +300,7 @@ pkgurl="https://www.winehq.org"
# i386 environments
if [[ $(uname -a | grep -c x86_64) -eq 0 ]]; then
echo "This script supports 64-bit architectures only."
echo "\e[1mERROR:\e[0m This script supports 64-bit architectures only."
exit 1
fi
@ -471,7 +471,7 @@ function check_gitOverride() {
cd "${commit_dir}"
if [[ $? -ne 0 ]]; then
echo -e "Error: couldn't access Wine folder ${commit_dir} to check commits. Aborting\n"
echo -e "\e[1mERROR:\e[0m Couldn't access Wine folder ${commit_dir} to check commits. Aborting\n"
exit 1
fi
@ -485,7 +485,7 @@ function check_gitOverride() {
done
if [[ $? -ne 0 ]]; then
echo -e "Error: couldn't parse Wine commits in ${commit_dir}. Aborting\n"
echo -e "\e[1mERROR:\e[0m Couldn't parse Wine commits in ${commit_dir}. Aborting\n"
exit 1
fi
@ -577,7 +577,7 @@ function WineDeps() {
local mgrcmd="sudo apt purge --remove -y"
;;
*)
echo -e "Error: Unknown package management input method. Aborting\n"
echo -e "\e[1mERROR:\e[0m Unknown package management input method. Aborting\n"
exit 1
esac
@ -624,7 +624,7 @@ function WineDeps() {
if [[ $? -eq 0 ]]; then
let b++
else
echo -e "\nError occured while processing ${pkgdep}. Aborting.\n"
echo -e "\n\e[1mERROR:\e[0m Error occured while processing ${pkgdep}. Aborting.\n"
exit 1
fi
done
@ -687,7 +687,7 @@ function refreshWineGIT() {
cd "${WINEDIR}"
git reset --hard ${git_commithash_wine} # Get Wine commit
if [[ $? -ne 0 ]]; then
echo "Error: couldn't find git commit '${git_commithash_wine}' for Wine. Aborting\n"
echo "\e[1mERROR:\e[0m Couldn't find git commit '${git_commithash_wine}' for Wine. Aborting\n"
exit 1
fi
git clean -d -x -f # Delete untracked files
@ -702,7 +702,7 @@ function refreshWineGIT() {
cd "${WINEDIR_STAGING}"
git reset --hard ${git_commithash_winestaging}
if [[ $? -ne 0 ]]; then
echo "Error: couldn't find git commit '${git_commithash_winestaging}' for Wine Staging. Aborting\n"
echo "\e[1mERROR:\e[0m Couldn't find git commit '${git_commithash_winestaging}' for Wine Staging. Aborting\n"
exit 1
fi
fi
@ -926,7 +926,7 @@ WineDeps install "${wine_deps_build_common[*]}" "Wine common build time" buildti
# Purge i386 buildtime dependencies
# On Debian, we can't have them with i386 at the same time
#
echo -e "Preparing system environment for 64-bit Wine compilation.\n"
echo -e "Preparing system for 64-bit Wine compilation.\n"
WineDeps remove "${wine_deps_build_i386[*]}" "Wine build time (32-bit)" buildtime
WineDeps install "${wine_deps_build_amd64[*]}" "Wine build time (64-bit)" buildtime
@ -941,7 +941,7 @@ echo -e "\nWine 64-bit build process finished.\n"
# Purge amd64 buildtime dependencies
# On Debian, we can't have them with i386 at the same time
#
echo -e "Preparing system environment for 32-bit Wine compilation.\n"
echo -e "Preparing system for 32-bit Wine compilation.\n"
WineDeps remove "${wine_deps_build_amd64[*]}" "Wine build time (64-bit)" buildtime
WineDeps install "${wine_deps_build_i386[*]}" "Wine build time (32-bit)" buildtime


Loading…
Cancel
Save