mirror of
https://github.com/Hizenberg469/environment-setup.git
synced 2026-04-19 21:12:23 +03:00
complete
This commit is contained in:
43
env_setup.sh
43
env_setup.sh
@@ -289,13 +289,15 @@ function setUpVimrc {
|
|||||||
return $RETURN_SUCCESS
|
return $RETURN_SUCCESS
|
||||||
}
|
}
|
||||||
|
|
||||||
function getVimVersion {
|
function checkVimVersion {
|
||||||
version=$(vim --version | head -n 1 | awk '{print $5}')
|
|
||||||
checkStatus 1
|
|
||||||
version=$(echo "$ver_num" | bc -l)
|
|
||||||
checkStatus 1
|
|
||||||
|
|
||||||
return version
|
ver_num=$(vim --version | head -n 1 | awk '{print $5}')
|
||||||
|
checkStatus 1
|
||||||
|
if (( $(echo "$ver_num >= 9.1" | bc -l) )) ; then
|
||||||
|
return $RETURN_SUCCESS
|
||||||
|
fi
|
||||||
|
|
||||||
|
return $RETURN_FAILURE
|
||||||
}
|
}
|
||||||
|
|
||||||
function setUpPluginDir {
|
function setUpPluginDir {
|
||||||
@@ -330,6 +332,7 @@ function setUpYCM {
|
|||||||
checkStatus 0 "Failure!!! YCM is not configured for C/C++ projects"
|
checkStatus 0 "Failure!!! YCM is not configured for C/C++ projects"
|
||||||
status=$?
|
status=$?
|
||||||
|
|
||||||
|
echo "YCM is configured"
|
||||||
cd $ORIGINAL_DIR
|
cd $ORIGINAL_DIR
|
||||||
return $status
|
return $status
|
||||||
}
|
}
|
||||||
@@ -359,17 +362,11 @@ function setUpCodeQuery {
|
|||||||
)
|
)
|
||||||
|
|
||||||
gui_packages=(
|
gui_packages=(
|
||||||
"libglx-dev"
|
"qtcreator"
|
||||||
"libgl1-mesa-dev"
|
"qtbase5-dev"
|
||||||
"libvulkan-dev"
|
"qt5-qmake"
|
||||||
"libxkbcommon-dev"
|
"qttools5-dev-tools"
|
||||||
"qt6-base-dev"
|
"qttools5-dev"
|
||||||
"qt6-base-dev-tools"
|
|
||||||
"qt6-tools-dev"
|
|
||||||
"qt6-tools-dev-tools"
|
|
||||||
"libqt6core5compact6-dev"
|
|
||||||
"qt6-l10n-tools"
|
|
||||||
"qt6-wayland"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
for pkg in "${req_packages[@]}"
|
for pkg in "${req_packages[@]}"
|
||||||
@@ -406,7 +403,7 @@ function setUpCodeQuery {
|
|||||||
return $RETURN_FAILURE
|
return $RETURN_FAILURE
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
cmake -DCMAKE_INSTALL_PREFIX="$HOME/tools/codequery" -G Ninja -S . -B build
|
cmake -DCMAKE_INSTALL_PREFIX="$HOME/tools/codequery" -G Ninja -DBUILD_QT5=ON -S . -B build
|
||||||
else
|
else
|
||||||
cmake -DCMAKE_INSTALL_PREFIX="$HOME/tools/codequery" -G Ninja -DNO_GUI=ON -S . -B build
|
cmake -DCMAKE_INSTALL_PREFIX="$HOME/tools/codequery" -G Ninja -DNO_GUI=ON -S . -B build
|
||||||
fi
|
fi
|
||||||
@@ -558,9 +555,9 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ "$INSTALL_YCM" = "YES" ] ; then
|
if [ "$INSTALL_YCM" = "YES" ] ; then
|
||||||
getVimVersion
|
checkVimVersion
|
||||||
version=$?
|
status=$?
|
||||||
if (( $(echo "$version > 9.1" | bc -l) )) ; then
|
if [ $status -eq $RETURN_SUCCESS ] ; then
|
||||||
setUpYCM
|
setUpYCM
|
||||||
status=$?
|
status=$?
|
||||||
logStatus "Setting up YCM: " $status
|
logStatus "Setting up YCM: " $status
|
||||||
@@ -571,9 +568,11 @@ fi
|
|||||||
|
|
||||||
if [ "$INSTALL_CODEQUERY" = "YES" ] ; then
|
if [ "$INSTALL_CODEQUERY" = "YES" ] ; then
|
||||||
setUpCodeQuery
|
setUpCodeQuery
|
||||||
setUpStarscope
|
|
||||||
status=$?
|
status=$?
|
||||||
logStatus "Setting up codequery: " $status
|
logStatus "Setting up codequery: " $status
|
||||||
|
setUpStarscope
|
||||||
|
status=$?
|
||||||
|
logStatus "Setting up starscope: " $status
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$INSTALL_VIM_CODEQUERY" = "YES" ] ; then
|
if [ "$INSTALL_VIM_CODEQUERY" = "YES" ] ; then
|
||||||
|
|||||||
Reference in New Issue
Block a user