2 releases
0.1.1 | Feb 4, 2020 |
---|---|
0.1.0 | Feb 3, 2020 |
#2303 in Command line utilities
22KB
150 lines
Welcome to snore 😴
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!
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.
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
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.
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
Install it with Cargo:
$ cargo install snore
If cargo installs into your PATH
, you can run it like this:
$ snore
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 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 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
🐘@fin_ger@weirder.earth
🐦@fin_ger_github
Show your support
Give a ⭐ if this project helped you!
Dependencies
~0.7–1MB