diff --git a/.gitignore b/.gitignore index 60a5985..4a915e2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ *.o -kwh-calc +kwh-cost .vscode \ No newline at end of file diff --git a/Makefile b/Makefile index b44a587..d1ebcbf 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -TARGET=kwh-calc +TARGET=kwh-cost CFLAGS=--std=c2x -O3 -Wall -Werror -Wextra -pedantic @@ -22,8 +22,8 @@ clean: install: install -Dm755 ${TARGET} ${DESTDIR}usr/bin/${TARGET} - install -Dm644 LICENSE ${DESTDIR}usr/share/licenses/kwh-calc/LICENSE + install -Dm644 LICENSE ${DESTDIR}usr/share/licenses/${TARGET}/LICENSE uninstall: rm -f ${DESTDIR}usr/bin/${TARGET} - rm -f ${DESTDIR}usr/share/licenses/kwh-calc/LICENSE \ No newline at end of file + rm -f ${DESTDIR}usr/share/licenses/${TARGET}/LICENSE \ No newline at end of file diff --git a/PKGBUILD b/PKGBUILD index 9735e9c..4d56999 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,13 +1,13 @@ # Maintainer: Alexander "Arav" Andreev -pkgname=kwh-calc +pkgname=kwh-cost pkgver=1.0.0 pkgrel=1 epoch=0 pkgdesc="Calculate cost of electricity." arch=('any') -url="https://git.arav.top/Arav/kwh-calc" +url="https://git.arav.top/Arav/kwh-cost" license=('MIT') -source=('git+https://git.arav.top/Arav/kwh-calc.git') +source=('git+https://git.arav.top/Arav/kwh-cost.git') md5sums=('SKIP') build() { diff --git a/README.md b/README.md index f767fa3..25815d6 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# kwh-calc +# kwh-cost Calculate cost of electricity. ## How to use ```shell -$ kwh-calc [OPTIONS] price wattage interval [interval ..] +$ kwh-cost [OPTIONS] price wattage interval [interval ..] ``` Options are -v, --version to show program's version; and -h, --help to show usage of a program. @@ -18,7 +18,7 @@ Options are -v, --version to show program's version; and -h, --help to show usag Here is an example: ```shell -$ kwh-calc 3.68 120 30d 2h +$ kwh-cost 3.68 120 30d 2h ``` P.S.: Yeah, I pay 3.68 rubles per kWh. Which is just $0.05. :) @@ -27,8 +27,8 @@ P.S.: Yeah, I pay 3.68 rubles per kWh. Which is just $0.05. :) ### Manually -First run `make` to build a program, and then `make install` to copy executable in `/usr/bin/`. Later, use `make uninstall` to delete it, or just delete `/usr/bin/kwh-calc`. +First run `make` to build a program, and then `make install` to copy executable in `/usr/bin/`. Later, use `make uninstall` to delete it, or just delete `/usr/bin/kwh-cost`. ### For ArchLinux -You can take a [PKGBUILD](/Arav/kwh-calc/raw/branch/master/PKGBUILD) file and in a directory with it run `makepkg -i`. \ No newline at end of file +You can take a [PKGBUILD](/Arav/kwh-cost/raw/branch/master/PKGBUILD) file and in a directory with it run `makepkg -i`. \ No newline at end of file diff --git a/src/main.c b/src/main.c index e596cb6..218d336 100644 --- a/src/main.c +++ b/src/main.c @@ -75,13 +75,13 @@ inline price_t to_wattpersecond(price_t price) { } void print_version() { - puts("kwh-calc Ver. " VERSION "\n" + puts("kwh-cost Ver. " VERSION "\n" "Copyright (C) 2021 Alexander \"Arav\" Andreev . All rights reserved.\n" - "License for this program is stored in /usr/share/licenses/kwh-calc/LICENSE."); + "License for this program is stored in /usr/share/licenses/kwh-cost/LICENSE."); } void print_usage() { - puts("Usage: kwh-calc [options] price wattage interval [interval ...]\n" + puts("Usage: kwh-cost [options] price wattage interval [interval ...]\n" "Options:\n" " --help, -h Display this usage information.\n" " --version, -v Display program version.\n"