snore

Crates.iosnore
lib.rssnore
version0.1.1
sourcesrc
created_at2020-02-03 15:52:37.082542
updated_at2020-02-04 18:09:58.648794
descriptionRuns for the given time and is similar to the Unix 'sleep' command
homepagehttps://github.com/fin-ger/snore
repositoryhttps://github.com/fin-ger/snore
max_upload_size
id204481
size71,799
dev (github:anser-tv:dev)

documentation

README

Welcome to snore 😴

rust stable build rust nightly build GitHub PRs Welcome
Runs for the given time and is similar to the Unix sleep command


This program is meant to explore cross-platform distribution over many operating systems and package managers. The program provides a cross-platform interface for delaying the execution of a script for a given amount of time.

Installation

Install on Debian

Including Ubuntu, Linux Mint, ElementaryOS, SteamOS, ZorinOS, etc.

If unsure use this package!

Download Debian Deb

The Debian package is not included in the Debian package repository, yet. For now you have to download and install it manually.

Download the deb package and install it with:

$ sudo apt-get install ./snore_0.1.1_amd64.deb

Install on Fedora

Including Red Hat, CentOS, OpenSUSE, etc.

Download Fedora RPM

The Fedora package is not included in the Fedora package repository, yet. For now you have to download and install it manually.

Download the rpm package and install it with:

$ sudo rpm -i ./snore-0.1.1-0.x86_64.rpm

Install on Gentoo GNU/Linux

Including Sabayon

Download Gentoo Ebuild

The ebuild is currently not included in the Gentoo packages. For now you have to use a local overlay to install snore.

Download the ebuild and place it under sys-apps/snore under your local overlay and digest the ebuild:

# mv snore-0.1.1.ebuild /path/to/your/local-overlay/sys-apps/snore/
# ebuild snore-0.1.1.ebuild digest

After that you can install snore with emerge:

# emerge snore

Install on Arch Linux

Including Manjaro, Parabola, Chakra, etc.

Download PKGBUILD

snore is not provided in the AUR for the moment, you're required to build it manually via the provided PKGBUILD

To install snore download the PKGBUILD and use makepkg to build & install it with pacman.

$ mkdir snore-pkg
$ mv PKGBUILD snore-pkg/PKGBUILD
$ cd snore-pkg 
$ makepkg --install

Install with Cargo

Crates.io Link

Install it with Cargo:

$ cargo install snore

If cargo installs into your PATH, you can run it like this:

$ snore

MacOS Binary

Download MacOS Binary

Download the snore-macos binary and rename it to snore:

$ mv snore-macos snore

Before you can run the executable, you have to set the executable flag:

$ chmod +x /path/to/snore

You can now run the program with:

$ /path/to/snore

Move the executable into your PATH to use it like any other program installed on the system

Windows Executable

Download Windows Executable

Download snore-windows.exe and rename it to snore.exe. You can now run the program in the Windows command-line:

C:\> \path\to\snore.exe

Move the executable into your PATH to use it like any other program installed on the system

Statically Linked Binary for Linux

Download Linux AMD64 Download Linux AARCH64 Download Linux ARM Download Linux ARMhf

Download the snore-linux binary suitable for your CPU architecture. If unsure, use amd64. After downloading, rename the executable to snore:

$ mv snore-linux-amd64 snore

Before you can run the executable, you have to set the executable flag:

$ chmod +x /path/to/snore

You can now run the program with:

$ /path/to/snore

Move the executable into your PATH to use it like any other program installed on the system

Usage

When snore is available in your PATH you can start using it.

Run snore for one second

$ snore 1

Run snore for 200 milliseconds

$ snore 200ms

Run snore for 1 hour and 20 minutes

$ snore 1h 20m

Run snore for 2 seconds and 500 milliseconds

$ snore 500ms 2s

Run snore for one and a half seconds

$ snore 1.5s

Run snore for 0.001 days

$ snore 0.001d

Building the Project

Instead of downloading a precompiled binary, you can build the project yourself from source. First you have to setup a Rust toolchain. I recommend using rustup. When the latest Rust stable toolchain is successfully installed, you can compile the code.

$ cargo install --path .

The program will be installed to ~/.cargo/bin/snore.

Troubleshooting

If you find any bugs/unexpected behaviour or you have a proposition for future changes open an issue describing the current behaviour and what you expected.

Deployment TODO

  • elf statically linked binary
  • mac executable
  • windows exe
  • ebuild
  • rpm
  • deb
  • pkgbuild
  • apkbuild
  • windows msi
  • solaris
  • homebrew
  • macports
  • chocolatey
  • scoop
  • nix
  • openbsd
  • netbsd
  • freebsd
  • npm
  • pip
  • cargo
  • ruby bundler

Authors

Fin Christensen

:octocat: @fin-ger
:elephant: @fin_ger@weirder.earth
:bird: @fin_ger_github

Show your support

Give a :star: if this project helped you!

Commit count: 42

cargo fmt