| Hash | Commit message | Author | Date | Files | + | - |
1 | commit ad15e1e90b3ea68deadbe5cb9291b03281eac465 |
2 | Author: Connor Etherington <[email protected]> |
3 | Date: Sat Jan 7 10:18:03 2023 +0200 |
4 | |
5 | Auto-Commit Update - 20230107 |
6 | --- |
7 | PKGBUILD | 2 +- |
8 | usr/bin.lockit | Bin 1254 -> 0 bytes |
9 | usr/bin/lockit.lockit | Bin 1003 -> 0 bytes |
10 | usr/lockit | 105 -------------------------------------------------- |
11 | 4 files changed, 1 insertion(+), 106 deletions(-) |
12 | |
13 | diff --git a/PKGBUILD b/PKGBUILD |
14 | index b464f9d..e86db8f 100644 |
15 | --- a/PKGBUILD |
16 | +++ b/PKGBUILD |
17 | @@ -12,7 +12,7 @@ source=("git+$url.git") |
18 | sha256sums=('SKIP') |
19 | |
20 | prepare() { |
21 | - install -Dm755 usr -t "$pkgdir/usr" |
22 | + mkdir -p "$pkgdir/usr/" |
23 | } |
24 | |
25 | package() { |
26 | diff --git a/usr/bin.lockit b/usr/bin.lockit |
27 | deleted file mode 100644 |
28 | index c841df2..0000000 |
29 | Binary files a/usr/bin.lockit and /dev/null differ |
30 | diff --git a/usr/bin/lockit.lockit b/usr/bin/lockit.lockit |
31 | deleted file mode 100644 |
32 | index 2e85db2..0000000 |
33 | Binary files a/usr/bin/lockit.lockit and /dev/null differ |
34 | diff --git a/usr/lockit b/usr/lockit |
35 | deleted file mode 100755 |
36 | index bf5c108..0000000 |
37 | --- a/usr/lockit |
38 | +++ /dev/null |
39 | @@ -1,105 +0,0 @@ |
40 | -#!/usr/bin/env bash |
41 | - |
42 | -LOCKITDIR="${XDG_DATA_HOME:-$HOME/.local/share}/lockit" |
43 | -TITLE=" ~ LockIt ~ " |
44 | - |
45 | -DIRS=`find . -maxdepth 1 -type d|sed 's/^\.\///'` |
46 | -FILES=`find . -maxdepth 1 -type f|sed 's/^\.\///'` |
47 | - |
48 | -TMP=$(mktemp) |
49 | -TMPFILE2=$(mktemp) |
50 | - |
51 | -mainOpts=( |
52 | - '1' 'Lock File' |
53 | - '2' 'Lock Directory' |
54 | - '3' 'Unlock File' |
55 | - '4' 'Unlock Directory' |
56 | -) |
57 | - |
58 | -mainMenu(){ \ |
59 | - mainSel=$(dialog \ |
60 | - --stdout --colors \ |
61 | - --title "${TITLE}" \ |
62 | - --menu "\n What would you like to do?\n " \ |
63 | - 17 55 6 "${mainOpts[@]}") |
64 | -} |
65 | - |
66 | -firstRun(){ |
67 | - |
68 | - dialog \ |
69 | - --title "${TITLE}" \ \ |
70 | - --msgbox "\\nWelcome to LockIt! This is a simple script, that makes use of GPG to simply and securely\\nlock - ( encrypt and decrypt ) files and folders.\n\n" 8 90 |
71 | - |
72 | - mkdir -p "${LOCKITDIR}" && touch "${LOCKITDIR}/.firstrun" |
73 | - |
74 | -} |
75 | - |
76 | -selectFile(){ |
77 | - |
78 | - ENCRYPT=$(dialog \ |
79 | - --title "$TITLE" \ |
80 | - --stdout --no-tags \ |
81 | - --menu "\\n Please select file/folder for encryption:\\n " 35 65 35 \ |
82 | - $(for x in `echo ${FILES}|xargs -n1|cut -d\ -f1|sed 's/^\.$//;s/^\.\.//'` ; |
83 | - do echo "${x} ${x}" ; done ; unset x)) || exit 1 |
84 | - |
85 | -} |
86 | - |
87 | -selectDir(){ |
88 | - |
89 | - ENCRYPT=$(dialog \ |
90 | - --title "$TITLE" \ |
91 | - --stdout --no-tags \ |
92 | - --menu "\\n Please select file/folder for encryption:\\n " 35 65 35 \ |
93 | - $(for x in `echo ${DIRS}|xargs -n1|cut -d\ -f1|sed 's/^\.$//;s/^\.\.//'` ; |
94 | - do echo "${x} ${x}" ; done ; unset x)) || exit 1 |
95 | - |
96 | -} |
97 | -selectLockIt(){ |
98 | - |
99 | - ENCRYPT=$(dialog \ |
100 | - --title "$TITLE" \ |
101 | - --stdout --no-tags \ |
102 | - --menu "\\n Please select file/folder for encryption:\\n " 35 65 35 \ |
103 | - $(for x in `ls -a1|grep "\.lockit$"|sed 's/\.lockit$//'` ; |
104 | - do echo "${x} ${x}" ; done ; unset x)) || exit 1 |
105 | - |
106 | -} |
107 | - |
108 | -lockDir(){ |
109 | - |
110 | - gpgtar \ |
111 | - --encrypt \ |
112 | - --symmetric \ |
113 | - --output ${1}.lockit \ |
114 | - --gpg-args="--batch" \ |
115 | - ${1} && rm -rf ${1} |
116 | - } |
117 | - |
118 | -lockFile(){ |
119 | - |
120 | - gpg \ |
121 | - --symmetric \ |
122 | - --no-symkey-cache \ |
123 | - --cipher-algo AES256 \ |
124 | - --s2k-digest-algo SHA512 \ |
125 | - --output ${1}.lockit \ |
126 | - ${1} && rm -rf ${1} |
127 | -} |
128 | - |
129 | - |
130 | -unlockDir(){ gpgtar --decrypt --directory ${PWD} ${1}.lockit ; } |
131 | - |
132 | -unlockFile(){ gpg --decrypt ${1} >$(basename ${ENCRYPT} .lockit) ; } |
133 | - |
134 | - |
135 | -! [ -f "$LOCKITDIR/.firstrun" ] && firstRun |
136 | - |
137 | -mainMenu && |
138 | - case ${mainSel} in |
139 | - 1) selectFile && lockFile ${ENCRYPT} ;; |
140 | - 2) selectDir && lockDir ${ENCRYPT} ;; |
141 | - 3) selectLockIt && unlockFile ${ENCRYPT} ;; |
142 | - 4) selectLockIt && unlockDir ${ENCRYPT} ;; |
143 | - esac |
144 | - |