mirror of
https://gitgud.io/wackyideas/aerothemeplasma.git
synced 2024-08-15 00:43:43 +00:00
Update install.sh
This commit is contained in:
parent
8a6d3df290
commit
5fda0e7d09
1 changed files with 55 additions and 35 deletions
82
install.sh
82
install.sh
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Somewhat automatic install script for AeroThemePlasma
|
# Somewhat automatic install script for AeroThemePlasma
|
||||||
# This installer is a WIP and doesn't do much other than
|
# This installer is a WIP and doesn't do much other than
|
||||||
|
@ -10,6 +10,9 @@
|
||||||
|
|
||||||
# Defining some useful paths
|
# Defining some useful paths
|
||||||
# User directories
|
# User directories
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
USER_CONFIG=~/.config/
|
USER_CONFIG=~/.config/
|
||||||
USER_LOCAL=~/.local/share/
|
USER_LOCAL=~/.local/share/
|
||||||
PLASMA_THEMES=${USER_LOCAL}plasma/desktoptheme/
|
PLASMA_THEMES=${USER_LOCAL}plasma/desktoptheme/
|
||||||
|
@ -103,7 +106,7 @@ function warning {
|
||||||
local answer="N"
|
local answer="N"
|
||||||
|
|
||||||
read -p "Do you want to continue? [y/N] " answer
|
read -p "Do you want to continue? [y/N] " answer
|
||||||
if [[ $answer != "y" ]] && [[ $answer != "Y" ]]
|
if [[ $answer != [Yy] ]]
|
||||||
then
|
then
|
||||||
printf "Exiting installer.\n"
|
printf "Exiting installer.\n"
|
||||||
exit
|
exit
|
||||||
|
@ -114,11 +117,17 @@ function warning {
|
||||||
function dependencies {
|
function dependencies {
|
||||||
local answer="N"
|
local answer="N"
|
||||||
|
|
||||||
|
if (( EUID != 0 ))
|
||||||
|
then
|
||||||
|
printf "Not running as root. The installer will now exit.\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ command -v pacman &> /dev/null ]
|
if [ command -v pacman &> /dev/null ]
|
||||||
then
|
then
|
||||||
read -p "The installer couldn't detect an Arch-based distribution installed on your computer.\nCurrently only Arch-based distributions are supported by the installer. Do you wish to continue? [y/N]\n\n" answer
|
read -p "The installer couldn't detect an Arch-based distribution installed on your computer.\nCurrently only Arch-based distributions are supported by the installer. Do you wish to continue? [y/N]\n\n" answer
|
||||||
|
|
||||||
if [[ $answer != "y" ]] && [[ $answer != "Y" ]]
|
if [[ $answer != [Yy] ]]
|
||||||
then
|
then
|
||||||
printf "Exiting installer.\n"
|
printf "Exiting installer.\n"
|
||||||
exit
|
exit
|
||||||
|
@ -128,18 +137,23 @@ function dependencies {
|
||||||
printf "Required dependencies:\n- git\n- kvantum\n- tar\n- cmake\n- extra-cmake-modules\n- Qt5 GraphicalEffects\n"
|
printf "Required dependencies:\n- git\n- kvantum\n- tar\n- cmake\n- extra-cmake-modules\n- Qt5 GraphicalEffects\n"
|
||||||
printf "Checking dependencies..."
|
printf "Checking dependencies..."
|
||||||
|
|
||||||
if [ $(echo $XDG_CURRENT_DESKTOP | grep KDE &> /dev/null) ]
|
if [[ $XDG_CURRENT_DESKTOP != KDE ]]
|
||||||
then
|
then
|
||||||
printf "\nThe installer couldn't detect KDE running on this system. The installer will now exit.\n"
|
printf "\nThe installer couldn't detect KDE running on this system. The installer will now exit.\n"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
if [ command -v git &> /dev/null ] || [ command -v tar &> /dev/null ] || [ command -v cmake &> /dev/null ] || [ command -v kvantummanager &> /dev/null ] || ! [ -f /usr/lib/qt/qml/QtGraphicalEffects/qmldir ] || ! [ -f /usr/share/ECM/cmake/ECMConfig.cmake ]
|
for cmd in git tar cmake kvantummanager \
|
||||||
|
/usr/lib/qt/qml/QtGraphicalEffects/qmldir \
|
||||||
|
/usr/share/ECM/cmake/ECMConfig.cmake
|
||||||
|
do
|
||||||
|
if ! command -v "$cmd" >/dev/null
|
||||||
then
|
then
|
||||||
printf "\nMissing dependencies. The installer will now exit.\n"
|
printf "Dependency '%s' is missing. The installer will now exit.\n" "$cmd"
|
||||||
exit
|
exit 1
|
||||||
else
|
else
|
||||||
printf " done.\n"
|
printf " done.\n"
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
}
|
}
|
||||||
function install_system {
|
function install_system {
|
||||||
echo "Overwriting system components..."
|
echo "Overwriting system components..."
|
||||||
|
@ -147,8 +161,9 @@ function install_system {
|
||||||
|
|
||||||
sudo mkdir -p "${TOOLTIP_DIR}"
|
sudo mkdir -p "${TOOLTIP_DIR}"
|
||||||
echo "Backing up DefaultToolTip.qml..."
|
echo "Backing up DefaultToolTip.qml..."
|
||||||
if ! test -f ${TOOLTIP_DIR}${TOOLTIP_QML}.bak; then
|
|
||||||
sudo cp ${TOOLTIP_DIR}${TOOLTIP_QML} ${TOOLTIP_DIR}${TOOLTIP_QML}.bak
|
if [[ ! -f ${TOOLTIP_DIR}${TOOLTIP_QML}.bak ]]; then
|
||||||
|
sudo cp "${TOOLTIP_DIR}${TOOLTIP_QML}" "${TOOLTIP_DIR}${TOOLTIP_QML}.bak"
|
||||||
fi
|
fi
|
||||||
echo "Installing DefaultToolTip.qml..."
|
echo "Installing DefaultToolTip.qml..."
|
||||||
sudo cp "${INNER_PLASMA_WIDGETS}System/${TOOLTIP_QML}" "${TOOLTIP_DIR}${TOOLTIP_QML}"
|
sudo cp "${INNER_PLASMA_WIDGETS}System/${TOOLTIP_QML}" "${TOOLTIP_DIR}${TOOLTIP_QML}"
|
||||||
|
@ -157,30 +172,33 @@ function install {
|
||||||
printf "Running AeroThemePlasma installer\n"
|
printf "Running AeroThemePlasma installer\n"
|
||||||
warning
|
warning
|
||||||
install_system
|
install_system
|
||||||
mkdir -p $PLASMA_THEMES
|
mkdir -p \
|
||||||
mkdir -p $USER_PLASMOIDS
|
"$PLASMA_THEMES" \
|
||||||
mkdir -p $COLOR_SCHEMES
|
"$USER_PLASMOIDS" \
|
||||||
mkdir -p $USER_ICONS
|
"$COLOR_SCHEMES" \
|
||||||
mkdir -p $USER_LOOK_AND_FEEL
|
"$USER_ICONS" \
|
||||||
mkdir -p $KWIN_SWITCHER_DIR
|
"$USER_LOOK_AND_FEEL" \
|
||||||
|
"$KWIN_SWITCHER_DIR"
|
||||||
echo "Installing user plasmoids..."
|
echo "Installing user plasmoids..."
|
||||||
sudo mkdir -p "${PLASMOID_PLUGINS}"
|
sudo mkdir -p "${PLASMOID_PLUGINS}"
|
||||||
sudo cp "${INNER_PLASMA_WIDGETS}User/${SEVEN_TASKS_PLUGIN}" "${PLASMOID_PLUGINS}"
|
sudo cp "${INNER_PLASMA_WIDGETS}User/${SEVEN_TASKS_PLUGIN}" "${PLASMOID_PLUGINS}"
|
||||||
sudo cp "${INNER_PLASMA_WIDGETS}User/${SEVEN_START_PLUGIN}" "${PLASMOID_PLUGINS}"
|
sudo cp "${INNER_PLASMA_WIDGETS}User/${SEVEN_START_PLUGIN}" "${PLASMOID_PLUGINS}"
|
||||||
rm -r "${USER_PLASMOIDS}${SEVEN_TASKS}" > /dev/null
|
rm -r \
|
||||||
rm -r "${USER_PLASMOIDS}${SEVEN_START}" > /dev/null
|
"${USER_PLASMOIDS}${SEVEN_TASKS}" \
|
||||||
rm -r "${USER_PLASMOIDS}${DIGITALCLOCKLITE}" > /dev/null
|
"${USER_PLASMOIDS}${SEVEN_START}" \
|
||||||
rm -r "${USER_PLASMOIDS}${SHOW_DESKTOP}" > /dev/null
|
"${USER_PLASMOIDS}${DIGITALCLOCKLITE}" \
|
||||||
|
"${USER_PLASMOIDS}${SHOW_DESKTOP}"
|
||||||
|
|
||||||
sudo rm -r "${USER_PLASMOIDS}${SYSTRAY}" > /dev/null
|
sudo rm -r "${USER_PLASMOIDS}${SYSTRAY}" \
|
||||||
sudo rm -r "${USER_PLASMOIDS}${KEYBOARD_LAYOUT}" > /dev/null
|
"${USER_PLASMOIDS}${KEYBOARD_LAYOUT}" \
|
||||||
sudo rm -r "${USER_PLASMOIDS}${DESKTOP_CONTAINMENT}" > /dev/null
|
"${USER_PLASMOIDS}${DESKTOP_CONTAINMENT}"
|
||||||
|
|
||||||
rm -rf "${USER_ICONS}${ICONTHEME}" > /dev/null
|
rm -rf \
|
||||||
rm -rf "${USER_ICONS}${CURSORTHEME}" > /dev/null
|
"${USER_ICONS}${ICONTHEME}" \
|
||||||
rm -r "${USER_LOOK_AND_FEEL}${SPLASH_SCREEN}" > /dev/null
|
"${USER_ICONS}${CURSORTHEME}" \
|
||||||
rm -r "${PLASMA_THEMES}${PLASMA_THEME}" > /dev/null
|
"${USER_LOOK_AND_FEEL}${SPLASH_SCREEN}" \
|
||||||
rm -r "${KWIN_SWITCHER_DIR}${KWIN_SWITCHER}" > /dev/null
|
"${PLASMA_THEMES}${PLASMA_THEME}" \
|
||||||
|
"${KWIN_SWITCHER_DIR}${KWIN_SWITCHER}"
|
||||||
|
|
||||||
for f in ${INNER_PLASMA_WIDGETS}User/io.gitgud.wackyideas.*; do
|
for f in ${INNER_PLASMA_WIDGETS}User/io.gitgud.wackyideas.*; do
|
||||||
cp -r "$f" "${USER_PLASMOIDS}"
|
cp -r "$f" "${USER_PLASMOIDS}"
|
||||||
|
@ -203,10 +221,12 @@ function install {
|
||||||
|
|
||||||
echo "Installing Reflection effect..."
|
echo "Installing Reflection effect..."
|
||||||
|
|
||||||
local rootdir=$(pwd)
|
local rootdir=$PWD
|
||||||
cd ${INNER_KWIN}kwin_reflect
|
local script=./install.sh
|
||||||
sh install.sh
|
|
||||||
cd ${rootdir}
|
cd "${INNER_KWIN}kwin_reflect"
|
||||||
|
chmod +x "$script" && "$script"
|
||||||
|
cd "$rootdir"
|
||||||
#sudo mkdir -p "${KWIN_EFFECTS_DIR}"
|
#sudo mkdir -p "${KWIN_EFFECTS_DIR}"
|
||||||
#sudo mkdir -p "${KWIN_CONFIGS_DIR}"
|
#sudo mkdir -p "${KWIN_CONFIGS_DIR}"
|
||||||
#sudo cp "${INNER_KWIN}kwin_reflect/bin/${KWIN_EFFECT}" "${KWIN_EFFECTS_DIR}"
|
#sudo cp "${INNER_KWIN}kwin_reflect/bin/${KWIN_EFFECT}" "${KWIN_EFFECTS_DIR}"
|
||||||
|
|
Loading…
Reference in a new issue