Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions linux-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
# Author: sickcodes
# Repo: https://github.com/konrad91/OneDarkArduino
# Contact: https://twitter.com/sickcodes
# Copyright: sickcodes (C) 2021
# License: GPLv3+

set -e

IDE_PATH=/usr/share/arduino/lib

if [ "$(pgrep arduino)" ]; then
echo "Please close Arduino IDE first."
exit 1
fi

if ! [ "$(stat ./theme)" ]; then
echo "No theme folder found in your current directory."
echo "Download again from Github, and run this from inside that directory."
exit 1
fi

echo "Moving OLD theme folder to ${IDE_PATH}/theme.bak"
mv "${IDE_PATH}/theme" "${IDE_PATH}/theme.bak"

echo "Moving NEW theme folder to ${IDE_PATH}/theme"
cp -r ./theme "${IDE_PATH}/theme"

exit 0
29 changes: 29 additions & 0 deletions linux-uninstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
# Author: sickcodes
# Repo: https://github.com/konrad91/OneDarkArduino
# Contact: https://twitter.com/sickcodes
# Copyright: sickcodes (C) 2021
# License: GPLv3+

set -e

IDE_PATH=/usr/share/arduino/lib

if [ "$(pgrep arduino)" ]; then
echo "Please close Arduino IDE first."
exit 1
fi

if ! [ "$(stat ${IDE_PATH}/theme.bak)" ]; then
echo "No old theme folder found in your Arduino libraries."
echo "Simply reinstalling Arduino (overwrite) will fix this."
exit 1
fi

echo "Removing the installed theme folder..."
rm -rf "${IDE_PATH}/theme"

echo "Moving OLD theme folder back ${IDE_PATH}/theme"
mv "${IDE_PATH}/theme.bak" "${IDE_PATH}/theme"

exit 0