diff options
author | Alexander Verbovetsky <alik@ejik.org> | 2017-01-31 20:18:12 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-02-04 06:59:32 +0700 |
commit | 7ae714a6cdcadf2cd1386c656d6361d1c07b56f9 (patch) | |
tree | dce1b505dba69a1db7b52087f5e15376688d1465 /system/nvme-cli/doinst.sh | |
parent | 974f16876c89e522a8e52a01ec8ed38f4a5fb659 (diff) |
system/nvme-cli: Added (NVMe management command line interface).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'system/nvme-cli/doinst.sh')
-rw-r--r-- | system/nvme-cli/doinst.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/system/nvme-cli/doinst.sh b/system/nvme-cli/doinst.sh new file mode 100644 index 0000000000000..b5a41d1d89880 --- /dev/null +++ b/system/nvme-cli/doinst.sh @@ -0,0 +1,14 @@ +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/bash_completion.d/nvme.new |