mirror of
https://github.com/kevinveenbirkenbach/linux-image-manager.git
synced 2024-12-23 04:25:04 +01:00
Added base.sh and refactored
This commit is contained in:
parent
89bb5b619d
commit
24e05b6c08
5
scripts/base.sh
Normal file
5
scripts/base.sh
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
# This script contains the global program variables and functions
|
||||
# @author Kevin Veen-Birkenbach [aka. Frantz]
|
||||
ENCRYPTED=$(readlink -f "$(dirname "$(readlink -f "${0}")")/../.encrypted");
|
||||
DECRYPTED=$(readlink -f "$(dirname "$(readlink -f "${0}")")/../data");
|
@ -2,7 +2,8 @@
|
||||
# Imports data from the system
|
||||
# @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");
|
||||
source "$(dirname "$(readlink -f "${0}")")/base.sh"
|
||||
DATA_FOLDER=$ENCRYPTED
|
||||
if [ -z "$(mount | grep $DATA_FOLDER)" ]
|
||||
then
|
||||
echo "The data folder $DATA_FOLDER is locked. You need to unlock it!"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# Locks the data
|
||||
# @author Kevin Veen-Birkenbach [aka. Frantz]
|
||||
DECRYPTED=$(readlink -f "$(dirname "$(readlink -f "${0}")")/../data");
|
||||
source "$(dirname "$(readlink -f "${0}")")/base.sh"
|
||||
echo "Locking directory $DECRYPTED..."
|
||||
fusermount -u "$DECRYPTED" && echo "Data is now encrypted." && echo "Removing directory $DECRYPTED..." && rmdir "$DECRYPTED"
|
||||
|
@ -1,4 +1,6 @@
|
||||
#!/bin/bash
|
||||
# Installs the core system
|
||||
# @author Kevin Veen-Birkenbach [aka. Frantz]
|
||||
echo "Start setup of customized core software..."
|
||||
echo "Synchronising packages..."
|
||||
echo "Synchronizing programing languages..."
|
||||
@ -57,7 +59,7 @@ apm install -c \
|
||||
highlight-selected\
|
||||
autocomplete-paths\
|
||||
todo-show\
|
||||
docblockr\
|
||||
docblockr
|
||||
npm i -g bash-language-server #Needed by atom-package ide-bash
|
||||
echo "Synchronizing containerization tools..."
|
||||
echo "Installing docker..."
|
||||
|
@ -1,8 +1,7 @@
|
||||
#!/bin/bash
|
||||
# Unlocks the data
|
||||
# @author Kevin Veen-Birkenbach [aka. Frantz]
|
||||
ENCRYPTED=$(readlink -f "$(dirname "$(readlink -f "${0}")")/../.encrypted");
|
||||
DECRYPTED=$(readlink -f "$(dirname "$(readlink -f "${0}")")/../data");
|
||||
source "$(dirname "$(readlink -f "${0}")")/base.sh"
|
||||
echo "Unlocking directory $DECRYPTED..."
|
||||
echo "Creating directory $DECRYPTED..."
|
||||
mkdir "$DECRYPTED"
|
||||
|
Loading…
Reference in New Issue
Block a user