mirror of
https://github.com/hyzendust/encryptall.git
synced 2026-02-15 04:01:17 +01:00
Fix: current directory recognition
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
|
||||||
mkdir -p Encrypted
|
mkdir -p Encrypted
|
||||||
|
|
||||||
echo -n "Enter password: "
|
echo -n "Enter password: "
|
||||||
@@ -11,7 +10,7 @@ PASSFILE=$(mktemp)
|
|||||||
echo "$PASSWORD" > "$PASSFILE"
|
echo "$PASSWORD" > "$PASSFILE"
|
||||||
|
|
||||||
for file in *; do
|
for file in *; do
|
||||||
if [ -f "$file" ] && [ "$file" != "Encrypted" ] && [ "$file" != "encryptall.sh" ]; then
|
if [ -f "$file" ] && [ "$file" != "Encrypted" ] && [ "$file" != "encryptall.sh" ] && [ "$file" != "encryptall" ]; then
|
||||||
# Check if already encrypted previously
|
# Check if already encrypted previously
|
||||||
if [ -f "Encrypted/${file}.gpg" ]; then
|
if [ -f "Encrypted/${file}.gpg" ]; then
|
||||||
echo "Skipping (already encrypted): $file"
|
echo "Skipping (already encrypted): $file"
|
||||||
|
|||||||
Reference in New Issue
Block a user