Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c8394c6 authored by thilo's avatar thilo
Browse files

- added gitignore

- added commons functionality
parent 081929b3
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+1 −0
Original line number Diff line number Diff line
.idea
 No newline at end of file
+5 −0
Original line number Diff line number Diff line
#!/usr/bin/env bash
function getRandomString {
        LENGTH=$1
        cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $LENGTH | head -n 1
@@ -10,3 +11,7 @@ function replaceTokensWithRandomStrings {
        RANDOMPART=$(getRandomString $REPLACEMENT_LENGTH)
        echo "$INPUT" | sed "s/$TOBEREPLACED/$RANDOMPART/g"
}
function doReplacementIfNecessary {
    VALUE="$1"
    echo "$VALUE" | grep -q "@@@generate@@@" && replaceTokensWithRandomStrings "$VALUE" || echo "$VALUE"
}
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ ln -s /mnt/repo-base /mnt/docker
cp /mnt/repo-base/deployment/salt/init-config/masterless.conf /etc/salt/minion.d/

# Run repo init (might run a few minutes)
echo "System update and pacakges installation .."
echo "System update and packages installation .."
salt-call state.apply init-repo

# Login to /e/ registry | not necessary when going public