diff --git a/Package.swift b/Package.swift index abac2cc..e4a51b0 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.1 +// swift-tools-version:5.0 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription diff --git a/README.md b/README.md index cd6b9a1..048771e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,30 @@ -# tlatia +# Tlatia -A description of this package. -# tlatia +A password-based utility to encrypt and decrypt files (like `ansible-vault`) + +## Requirements + +- Swift 5.0 + +## Install + +```sh +$ ./install.sh +``` + +This will build the executable and copy it under your `/usr/local/bin` +directory for easy access. + +## Usage + +```sh +$ tlatia OPERATION INPUT OUTPUT +``` + +- *OPERATION*: `encrypt` | `decrypt` +- *INPUT*: Input file to encrypt or decrypt +- *OUTPUT*: Output file where to write the result + +This will take a `utf8` encrypted file and ask for a password and then proceed +to encrypt/decrypt your file. If you are encrypting it will ask a confirmation +before proceeding. diff --git a/Sources/tlatia/main.swift b/Sources/tlatia/main.swift index 83d1200..9ed49b4 100644 --- a/Sources/tlatia/main.swift +++ b/Sources/tlatia/main.swift @@ -32,7 +32,7 @@ enum Operation: String { } guard CommandLine.argc == 4 else { - print("Usage: tlatia OPERATION INPUT [OUTPUT]") + print("Usage: tlatia OPERATION INPUT OUTPUT") exit(EXIT_FAILURE) } diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..5ba2b9c --- /dev/null +++ b/install.sh @@ -0,0 +1,8 @@ +#!/bin/sh +echo Building... +swift build -c release + +echo Copying executable to "/usr/local/bin/" +cp .build/release/tlatia /usr/local/bin/ + +echo Finished... \ No newline at end of file