Skip to content

Commit

Permalink
Merge pull request #1 from YOCKOW/development
Browse files Browse the repository at this point in the history
Release v1.0.0
  • Loading branch information
YOCKOW authored Nov 22, 2021
2 parents 9c2596f + 40b031f commit 4e6c323
Show file tree
Hide file tree
Showing 24 changed files with 1,081 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI
on:
push:
branches:
- '**'
tags-ignore:
- '**'
paths:
- 'bin/**'
- 'tests/**'
- 'utils/**'
- '.github/workflows/*.yml'
pull_request:
paths:
- 'bin/**'
- 'tests/**'
- 'utils/**'
- '.github/workflows/*.yml'
jobs:
test:
strategy:
matrix:
os:
- ubuntu-latest
- macOS-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install zsh
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install zsh
- name: Run Tests
run: make test
- name: Install dlx
run: |
sudo make install
which dlx
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.DS_Store
.SSTLockFile
/.SSTest
17 changes: 17 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
The MIT License (MIT)
Copyright (c) 2021 YOCKOW

Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
PREFIX=/usr/local

path_to_this_file := $(abspath $(lastword $(MAKEFILE_LIST)))
repository_dir := $(shell dirname "$(path_to_this_file)")

.PHONY: build
build:
@echo Nothing to do.

.PHONY: clean
clean:
rm -rf "$(repository_dir)/.SSTest"

.PHONY: test
test:
@"$(repository_dir)/utils/run-tests"

.PHONY: insatll
install:
@cp -vf "$(repository_dir)/bin/dlx" "$(PREFIX)/bin/dlx"

64 changes: 64 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# What is `dlx`?

It's a command line tool to **D**own**L**oad and e**X**tract files.
It is available to verify the downloaded file with its hash before extracting.


# Requirements

* [Zsh](https://www.zsh.org/)
* [cURL](https://curl.se)
* Hash tools
- MD5: `md5`, `md5sum`, `gmd5sum`, or `openssl`
- SHA1: `sha1sum`, `gsha1sum`, or `openssl`
- SHA256: `sha256sum`, `gsha256sum`, or `openssl`
- SHA512: `sha512sum`, `gsha512sum`, or `openssl`
- PGP: `gpg`
* OS: macOS/Linux


# How to install

```console
% git clone https://GitHub.com/YOCKOW/dlx.git
% cd dlx
% make test && sudo make install
```


# Usage

```console
% dlx https://example.com/veryFantasticTools.zip \
--md5=63aac7068fea572fea8d15417d846d80

% dlx https://example.com/veryFantasticOtherTools.tar.gz \
--pgp=https://example.com/veryFantasticOtherTools.tar.gz.sig
```

Try `dlx --help` to read more details.


## Samples

### Apache mod_fcgid FastCGI module

```console
% mod_fcgid_url="https://dlcdn.apache.org/httpd/mod_fcgid/mod_fcgid-2.3.9.tar.gz"
% dlx "$mod_fcgid_url" \
--md5 "$mod_fcgid_url.md5" \
--sha1 "$mod_fcgid_url.sha1" \
--dir ./my-fcgid-directory
```

### Swift Toolchain

```console
% swift_toolchain_url="https://download.swift.org/swift-5.5.1-release/ubuntu2004/swift-5.5.1-RELEASE/swift-5.5.1-RELEASE-ubuntu20.04.tar.gz"
% dlx "$swift_toolchain_url" --pgp="$swift_toolchain_url.sig"
```


# License
MIT License.
See "LICENSE.txt" for more information.
Loading

0 comments on commit 4e6c323

Please sign in to comment.