Optimized code quality

This commit is contained in:
Kevin Veen-Birkenbach 2019-10-01 07:55:33 +02:00
parent fd8f023801
commit 28628b5ace
5 changed files with 11 additions and 9 deletions

View File

@ -1,5 +1,5 @@
# Core System
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](./LICENSE.txt)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](./LICENSE.txt) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/6e66409513d7451b949afbf0373ba71f)](https://www.codacy.com/manual/KevinFrantz/core-system?utm_source=github.com&utm_medium=referral&utm_content=KevinFrantz/core-system&utm_campaign=Badge_Grade)
This repository contains scripts to set up an working client system, maintain it and to save the data on an USB stick.
It's adapted to the needs of Kevin Veen-Birkenbach aka. Frantz.

View File

@ -3,7 +3,7 @@
# @author Kevin Veen-Birkenbach [aka. Frantz]
# @param $1 If the first parameter is "reverse" the data will be exported to the system
DATA_FOLDER=$(readlink -f "$(dirname "$(readlink -f "${0}")")/../data");
if [ -z $(mount | grep $DATA_FOLDER) ]
if [ -z "$(mount | grep $DATA_FOLDER)" ]
then
echo "The data folder $DATA_FOLDER is locked. You need to unlock it!"
bash "$(dirname "$(readlink -f "${0}")")/unlock.sh" || exit 1;
@ -26,9 +26,9 @@ do
then
echo "The destination file allready exists!";
echo "Difference:"
diff $destination $source
diff "$destination" "$source"
fi
destination_dir=$(dirname $destination)
destination_dir=$(dirname "$destination")
mkdir -p "$destination_dir"
if [ -f "$source" ]
then

View File

@ -3,4 +3,4 @@
# @author Kevin Veen-Birkenbach [aka. Frantz]
DECRYPTED=$(readlink -f "$(dirname "$(readlink -f "${0}")")/../data");
echo "Locking directory $DECRYPTED..."
fusermount -u $DECRYPTED && echo "Data is now encrypted." && echo "Removing directory $DECRYPTED..." && rmdir $DECRYPTED
fusermount -u "$DECRYPTED" && echo "Data is now encrypted." && echo "Removing directory $DECRYPTED..." && rmdir "$DECRYPTED"

View File

@ -22,7 +22,7 @@ fi
echo "Synchronizing gui tools..."
sudo pacman --needed -S gnome-shell-extensions
echo "Install NASA picture of the day GNOME extension..."
git clone https://github.com/Elinvention/gnome-shell-extension-nasa-apod.git $HOME/.local/share/gnome-shell/extensions/nasa_apod@elinvention.ovh
git clone https://github.com/Elinvention/gnome-shell-extension-nasa-apod.git "$HOME/.local/share/gnome-shell/extensions/nasa_apod@elinvention.ovh"
gnome-shell-extension-tool -e nasa_apod@elinvention.ovh
echo "Synchronizing web tools..."
sudo pacman --needed -S chromium firefox firefox-ublock-origin firefox-extension-https-everywhere firefox-dark-reader firefox-noscript
@ -31,6 +31,8 @@ sudo pacman --needed -S gimp
echo "Synchronizing communication tools..."
yay pacman --needed -S slack-desktop skypeforlinux-stable-bin
echo "Synchronizing development tools..."
echo "Synchronizing code quality tools..."
sudo pacman --needed -S shellcheck
echo "Synchronizing visualization tools..."
sudo pacman --needed -S dia
echo "Synchronizing IDE's..."
@ -62,7 +64,7 @@ sudo pacman --needed -S docker
echo "Synchronizing orchestration tools..."
sudo pacman --needed -S ansible
echo "Add current user($USER) to user group docker..."
sudo usermod -a -G docker $USER
sudo usermod -a -G docker "$USER"
echo "Enable docker service..."
sudo systemctl enable docker --now
echo "Synchronizing games..."

View File

@ -5,6 +5,6 @@ ENCRYPTED=$(readlink -f "$(dirname "$(readlink -f "${0}")")/../.encrypted");
DECRYPTED=$(readlink -f "$(dirname "$(readlink -f "${0}")")/../data");
echo "Unlocking directory $DECRYPTED..."
echo "Creating directory $DECRYPTED..."
mkdir $DECRYPTED
mkdir "$DECRYPTED"
echo "Encrypting directory $DECRYPTED to $DECRYPTED..."
encfs $ENCRYPTED $DECRYPTED && echo "ATTENTION: DATA IS NOW DECRYPTED!"
encfs "$ENCRYPTED" "$DECRYPTED" && echo "ATTENTION: DATA IS NOW DECRYPTED!"