diff options
author | Andy Alt <andy400-dev@yahoo.com> | 2018-10-27 06:11:33 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-10-27 09:27:31 +0700 |
commit | 14b0b718bd4f70d01f2533f2e35b9039b7a58135 (patch) | |
tree | ce9d389af4213e1455a7e93a77c492d505b55525 /system/rmw | |
parent | cf85678bd12c650ba563bee227134228e76e3226 (diff) |
system/rmw: Updated for version 0.4.05.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/rmw')
-rw-r--r-- | system/rmw/README.Slackware | 87 | ||||
-rw-r--r-- | system/rmw/doinst.sh | 12 | ||||
-rw-r--r-- | system/rmw/rmw.SlackBuild | 36 | ||||
-rw-r--r-- | system/rmw/rmw.info | 8 | ||||
-rw-r--r-- | system/rmw/slack-desc | 2 |
5 files changed, 96 insertions, 49 deletions
diff --git a/system/rmw/README.Slackware b/system/rmw/README.Slackware index e94822d9bb53..c7c03d8d8f40 100644 --- a/system/rmw/README.Slackware +++ b/system/rmw/README.Slackware @@ -1,23 +1,28 @@ -[![Build Status](https://travis-ci.org/andy5995/rmw.svg?branch=master)](https://travis-ci.org/andy5995/rmw) +[![Build Status](https://travis-ci.org/theimpossibleastronaut/rmw.svg?branch=master)](https://travis-ci.org/theimpossibleastronaut/rmw) +[![Build Status](https://semaphoreci.com/api/v1/andy5995/rmw-3/branches/master/badge.svg)](https://semaphoreci.com/andy5995/rmw-3) -# rmw v0.4.03 +# rmw v0.4.05 -rmw is an OS portable cli trash can utility written in C. It can send +rmw is a cross-platform command-line "trash can" utility. It can send files to your "Desktop" trash, or a completely separate folder. It can also: restore files; permanently delete files that were rmw'ed more -than xx number of days ago; skip files or directories that have a +than x number of days ago; skip files or directories that have a "PROTECT" directive in the configuration file; and append a unique string to the filenames so they won't be overwritten (duplication protection). -Web site: https://github.com/andy5995/rmw/wiki +Web site: https://github.com/theimpossibleastronaut/rmw/wiki -Anyone interested in this project is welcome to join the [chat -room](https://join.slack.com/t/removetowaste/shared_invite/enQtMjU3NTA0NTI2OTgzLTkzMzQxNDhjYzlkM2UxMTA2MzJjNWYyZjAyYzkyNWNmZjJmYWZmYjUyODk2NzNkNzBhMzFjOGZkMTg2MzAxMTM). +Anyone interested in this project is welcome to join the [Matrix chat +room](https://matrix.to/#/!XeJxcdkywroPaRKKtr:matrix.org). + +## For Translators + +We use Transifex to translate the output messages. To start translating +rmw, ​create an account in Transifex and ask to join a translation +team (or create a new one) at +https://www.transifex.com/na-309/rmw/ -If you would like to help translate the man page or the output messages -for this program, please see the [Translating wiki -page](https://github.com/andy5995/rmw/wiki/Translating). ## Required libraries @@ -32,14 +37,10 @@ package from your operating system distribution. Use `./configure --help` to view available compile-time options. - ./configure --prefix=/usr --sysconfdir=/etc + ./configure make make install -If the --prefix and --sysconfdir options are omitted, "/usr/local" will be -used instead. If you are using **MacOSX** and have problems installing to -/usr/bin, try omitting those two options. - ### As a normal user: ./configure --prefix=$HOME/usr @@ -52,42 +53,42 @@ copied to $HOME/usr/etc ### Pre-built binary packages Packages for some operating systems are available on the -[Downloads](https://github.com/andy5995/rmw/releases) page +[Downloads](https://github.com/theimpossibleastronaut/rmw/releases) page + +### Using _Homebrew_ on Mac OS X + +Add a tap and install rmw: + +* brew tap [theimpossibleastronaut/homebrew-extras](https://github.com/theimpossibleastronaut/homebrew-extras) +* brew install rmw ## Uninstall / Cleaning up - make uninstall - make distclean -``` -man pages are now available in the following languages: +* make uninstall (uninstalls the program if installed with 'make install`) +* make distclean (removes files in the build directory created by +`configure` and 'make') - * de - * en - * es - * fi - * ne - * nl_NL - * pl - * pt_BR +## Usage +``` +== First-time use == If you installed rmw as a normal user, this next step can be skipped. -After rmw is installed, create the user configuration directory by typing -'rmw' and hitting enter. Afterward, it's recommended to copy /etc/rmwrc (or -/usr/local/etc/rmwrc) to $HOME/.config/rmw and then rename it to 'config': +After rmw is installed, create the user configuration directory by +typing 'rmw' and hitting enter. Afterward, copy rmwrc to +$HOME/.config/rmw and rename it to 'config': -'cd ~/.config/rmw' -'~/.config/rmw$ cp /etc/rmwrc .' -'~/.config/rmw$ mv rmwrc config' + cd ~/.config/rmw + ~/.config/rmw$ cp rmwrc config Then edit the file to suit your needs. -At some point, rmw will automatically create a 'lastpurge' and 'lastrmw' -in that same directory. +rmw will automatically create a 'lastpurge' and 'lastrmw' in that same +directory. == Configuration File == -Documentation explaining the configuration can be found in 'etc/rmwrc' +Documentation explaining the configuration can be found in rmwrc. Waste folders will be created automatically. (e.g. if '$HOME/trash.rmw' is listed in the config file, these 3 directories will be created: @@ -100,6 +101,14 @@ option of appending ',removable' (details in etc/rmwrc). == Features and Options == +Usage: rmw [OPTION]... FILE... +ReMove the FILE(s) to a WASTE directory listed in configuration file + + or: rmw -s + or: rmw -u + or: rmw -z FILE... +Restore FILE(s) from a WASTE directory + -h, --help -t, --translate display a translation of the configuration file -c, --config filename use an alternate configuration @@ -113,7 +122,7 @@ option of appending ',removable' (details in etc/rmwrc). -V, --version display version and license information - ===] Restoring [=== + ===] Restoring [=== -z, --restore <wildcard filename(s) pattern> -s, --select select files from list to restore @@ -172,7 +181,7 @@ If a translation of the configuration file is available in your native language is available, it will be displayed. (If you would be interested in adding a translation, please visit -https://github.com/andy5995/rmw/wiki/Translating) +https://github.com/theimpossibleastronaut/rmw/wiki/Translating) == -f, --force == rmw will normally refuse to purge directories if they contain non-writable diff --git a/system/rmw/doinst.sh b/system/rmw/doinst.sh new file mode 100644 index 000000000000..a8f047556c7c --- /dev/null +++ b/system/rmw/doinst.sh @@ -0,0 +1,12 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} +config etc/rmwrc.new diff --git a/system/rmw/rmw.SlackBuild b/system/rmw/rmw.SlackBuild index 6def0726b4c3..3c0ddbdde4bf 100644 --- a/system/rmw/rmw.SlackBuild +++ b/system/rmw/rmw.SlackBuild @@ -1,11 +1,29 @@ #!/bin/sh - +# # Slackware build script for rmw - -# Written by (Andy Alt) (andy400-dev@yahoo.com) +# +# Copyright 2018 / Andy Alt / United States +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=rmw -VERSION=${VERSION:-0.4.03} +VERSION=${VERSION:-0.4.05} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -57,16 +75,24 @@ CXXFLAGS="$SLKCFLAGS" \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/man \ + --localedir=/usr/share/locale \ --docdir=/usr/doc/$PRGNAM-$VERSION \ --build=$ARCH-slackware-linux make -make install DESTDIR=$PKG +make install-strip DESTDIR=$PKG + +mkdir -p $PKG/etc +cat rmwrc > $PKG/etc/rmwrc.new + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/rmw/rmw.info b/system/rmw/rmw.info index d3a47871a275..81c3ae9dea10 100644 --- a/system/rmw/rmw.info +++ b/system/rmw/rmw.info @@ -1,8 +1,8 @@ PRGNAM="rmw" -VERSION="0.4.03" -HOMEPAGE="https://github.com/andy5995/rmw/wiki" -DOWNLOAD="https://github.com/andy5995/rmw/releases/download/v0.4.03/rmw-0.4.03.tar.gz" -MD5SUM="e966cc5ac53ec038f7a9b51ca0fa2c06" +VERSION="0.4.05" +HOMEPAGE="https://github.com/theimpossibleastronaut/rmw/wiki" +DOWNLOAD="https://github.com/theimpossibleastronaut/rmw/releases/download/v0.4.05/rmw-0.4.05.tar.gz" +MD5SUM="6de074da3fcf206c7791d73ff81a70b0" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/system/rmw/slack-desc b/system/rmw/slack-desc index 39ea8f8cb279..dee6a3392a59 100644 --- a/system/rmw/slack-desc +++ b/system/rmw/slack-desc @@ -16,4 +16,4 @@ rmw: that have a "PROTECT" directive in the configuration file; and append rmw: a unique string to the filenames so they won't be overwritten rmw: (duplication protection). rmw: -rmw: Homepage: https://github.com/andy5995/rmw/wiki +rmw: Homepage: https://github.com/theimpossibleastronaut/rmw/wiki |