Skip to content

Commit

Permalink
Added install script and updated the README
Browse files Browse the repository at this point in the history
  • Loading branch information
ctorresmx committed Nov 13, 2019
1 parent 464802a commit f4b1ef9
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -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
Expand Down
32 changes: 29 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion Sources/tlatia/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
8 changes: 8 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -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...

0 comments on commit f4b1ef9

Please sign in to comment.