Automatically ignore the cwd
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
parent
7af098a4fd
commit
a0b6665ab0
1 changed files with 5 additions and 5 deletions
10
encrypt.py
10
encrypt.py
|
@ -13,14 +13,17 @@ from glob import glob
|
||||||
import subprocess
|
import subprocess
|
||||||
from time import time
|
from time import time
|
||||||
|
|
||||||
|
cwd = os.getcwd()
|
||||||
|
path = Path(cwd)
|
||||||
|
base_dir = str(path.parent.absolute())
|
||||||
|
|
||||||
# Blacklist, prevents handling these files altogether
|
# Blacklist, prevents handling these files altogether
|
||||||
BLACKLIST = [
|
BLACKLIST = [
|
||||||
".git",
|
".git",
|
||||||
".obsidian",
|
".obsidian",
|
||||||
".idea",
|
".idea",
|
||||||
".gitlab-ci.yml",
|
".gitlab-ci.yml",
|
||||||
".encrypt.py",
|
cwd.split(base_dir + "/")[1]
|
||||||
".trigger.py",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# Env vars to handle creds
|
# Env vars to handle creds
|
||||||
|
@ -31,9 +34,6 @@ enc_repo_pass = os.environ.get("ENCRYPTED_REPO_PASSWORD")
|
||||||
enc_key = os.environ.get("ENCRYPTION_KEY")
|
enc_key = os.environ.get("ENCRYPTION_KEY")
|
||||||
|
|
||||||
# Create our encrypted directory base
|
# Create our encrypted directory base
|
||||||
cwd = os.getcwd()
|
|
||||||
path = Path(cwd)
|
|
||||||
base_dir = str(path.parent.absolute())
|
|
||||||
current_time = str(int(time()))
|
current_time = str(int(time()))
|
||||||
os.mkdir(enc_path)
|
os.mkdir(enc_path)
|
||||||
os.chdir(enc_path)
|
os.chdir(enc_path)
|
||||||
|
|
Loading…
Reference in a new issue