add initial files
This commit is contained in:
99
.drone.yml
Normal file
99
.drone.yml
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: default
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
limit: 1
|
||||||
|
|
||||||
|
workspace:
|
||||||
|
path: /drone/src
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: checkout submodule
|
||||||
|
image: alpine/git
|
||||||
|
commands:
|
||||||
|
- git submodule update --init --recursive
|
||||||
|
- name: checkout tag
|
||||||
|
image: alpine/git
|
||||||
|
commands:
|
||||||
|
- cd rip
|
||||||
|
- git fetch --all --tags
|
||||||
|
- git checkout tags/${DRONE_TAG}
|
||||||
|
depends_on:
|
||||||
|
- "checkout submodule"
|
||||||
|
- name: cargo build
|
||||||
|
image: rust:latest
|
||||||
|
commands:
|
||||||
|
- cd rip
|
||||||
|
- cargo build --release --target x86_64-unknown-linux-gnu
|
||||||
|
- cd target/x86_64-unknown-linux-gnu/release
|
||||||
|
depends_on:
|
||||||
|
- "checkout tag"
|
||||||
|
- name: build slackware package
|
||||||
|
image: vbatts/slackware:14.2
|
||||||
|
commands:
|
||||||
|
- mkdir -p dist/usr/sbin
|
||||||
|
- cp rip/target/x86_64-unknown-linux-gnu/release/rip ./dist/usr/sbin/rip
|
||||||
|
- cp -R ./usr ./dist
|
||||||
|
- chmod +x ./dist/usr/sbin/rip
|
||||||
|
- cd dist
|
||||||
|
- makepkg -l y -c y ../unraid-rip-${DRONE_TAG}.txz
|
||||||
|
depends_on:
|
||||||
|
- "cargo build"
|
||||||
|
- name: prepare release
|
||||||
|
image: vbatts/slackware:14.2
|
||||||
|
commands:
|
||||||
|
- echo "rip ${DRONE_TAG} - built@$(date '+%FT%TZ') [Drone ${DRONE_SYSTEM_VERSION}]" > ./release_note
|
||||||
|
- cat ./release_note
|
||||||
|
depends_on:
|
||||||
|
- "build slackware package"
|
||||||
|
- name: publish gitea release
|
||||||
|
image: plugins/gitea-release
|
||||||
|
settings:
|
||||||
|
api_key:
|
||||||
|
from_secret: GITEA_KEY
|
||||||
|
base_url: https://git.panaetius.co.uk
|
||||||
|
files:
|
||||||
|
- ./unraid-rip-${DRONE_TAG}.txz
|
||||||
|
checksum:
|
||||||
|
- md5
|
||||||
|
title: ${DRONE_TAG}
|
||||||
|
note: ./release_note
|
||||||
|
file_exists: "skip"
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
depends_on:
|
||||||
|
- "prepare release"
|
||||||
|
- name: publish github release
|
||||||
|
image: plugins/github-release
|
||||||
|
settings:
|
||||||
|
api_key:
|
||||||
|
from_secret: GITHUB_KEY
|
||||||
|
files:
|
||||||
|
- ./unraid-rip-${DRONE_TAG}.txz
|
||||||
|
checksum:
|
||||||
|
- md5
|
||||||
|
title: ${DRONE_TAG}
|
||||||
|
note: ./release_note
|
||||||
|
file_exists: "skip"
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
depends_on:
|
||||||
|
- "prepare release"
|
||||||
|
- name: slack
|
||||||
|
image: plugins/slack
|
||||||
|
settings:
|
||||||
|
webhook:
|
||||||
|
from_secret: BUILD_STATUS_SLACK_WEBHOOK
|
||||||
|
username: drone
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- "success"
|
||||||
|
- "failure"
|
||||||
|
depends_on:
|
||||||
|
- "publish gitea release"
|
||||||
|
- "publish github release"
|
||||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.DS_STORE
|
||||||
15
README.md
15
README.md
@@ -1 +1,14 @@
|
|||||||
# unraid-dust
|
# dust
|
||||||
|
|
||||||
|
This is the repository for the unraid dust plugin.
|
||||||
|
|
||||||
|
<img src="https://git.panaetius.co.uk/dtomlinson91/unraid-rip/raw/branch/main/assets/unraid-dust.png"/>
|
||||||
|
|
||||||
|
du + rust = dust. Like du but more intuitive. An easy way to see where your disk is being used.
|
||||||
|
|
||||||
|
For more information see the [dust repository](https://github.com/bootandy/dust).
|
||||||
|
## dev
|
||||||
|
|
||||||
|
Drone builds the plugin source using cargo on a new tag creation.
|
||||||
|
|
||||||
|
Tag versions follow rip releases.
|
||||||
|
|||||||
BIN
assets/unraid-dust.png
Normal file
BIN
assets/unraid-dust.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
73
dev.unraid-dust.plg
Normal file
73
dev.unraid-dust.plg
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
<?xml version='1.0' standalone='yes'?>
|
||||||
|
<!DOCTYPE PLUGIN [
|
||||||
|
<!ENTITY name "unraid-rip">
|
||||||
|
<!ENTITY author "dtomlinson">
|
||||||
|
<!ENTITY org "dtomlinson91">
|
||||||
|
<!ENTITY version "0.13.1">
|
||||||
|
<!ENTITY gitURL "https://git.panaetius.co.uk/&org;/&name;">
|
||||||
|
<!ENTITY pluginURL "&gitURL;/raw/branch/master/&name;.plg">
|
||||||
|
<!ENTITY releaseURL "&gitURL;/releases/download/&version;/&name;-&version;.txz">
|
||||||
|
<!ENTITY md5 "2a6dde372dcf6c3a74bfa1c11d22875f">
|
||||||
|
<!ENTITY plugin "/boot/config/plugins/&name;">
|
||||||
|
<!ENTITY emhttp "/usr/local/emhttp/plugins/&name;">
|
||||||
|
]>
|
||||||
|
|
||||||
|
<PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="&pluginURL;" min="6.8.3">
|
||||||
|
|
||||||
|
<CHANGES>
|
||||||
|
|
||||||
|
### 2022-05-06
|
||||||
|
|
||||||
|
- Initial release - rip 0.13.1
|
||||||
|
|
||||||
|
</CHANGES>
|
||||||
|
|
||||||
|
<FILE Run="/bin/bash">
|
||||||
|
<INLINE>
|
||||||
|
<!-- remove previous version if present -->
|
||||||
|
file=$(/usr/bin/ls /boot/config/plugins/&name;/&name;*.txz | grep -v '&version;')
|
||||||
|
if [ ! -z "$file" ]
|
||||||
|
then
|
||||||
|
filename=$(basename -- $file)
|
||||||
|
previous="${filename%.*}"
|
||||||
|
echo "previous version ${previous} found - uninstalling"
|
||||||
|
removepkg $previous
|
||||||
|
rm -f $file
|
||||||
|
else
|
||||||
|
echo "no previous version found - first time install"
|
||||||
|
fi
|
||||||
|
</INLINE>
|
||||||
|
</FILE>
|
||||||
|
|
||||||
|
<FILE Name="/boot/config/plugins/&name;/&name;-&version;.txz" Run="upgradepkg --install-new">
|
||||||
|
<URL>&releaseURL;</URL>
|
||||||
|
<MD5>&md5;</MD5>
|
||||||
|
</FILE>
|
||||||
|
|
||||||
|
<FILE Name="&emhttp;/README.md">
|
||||||
|
<INLINE>
|
||||||
|
**rip**
|
||||||
|
|
||||||
|
rip is a command-line deletion tool focused on safety, ergonomics, and performance. It favors a simple interface, and does not implement the xdg-trash spec or attempt to achieve the same goals.
|
||||||
|
|
||||||
|
Deleted files get sent to the graveyard (`/tmp/graveyard-$USER` by default, see notes on changing this) under their absolute path, giving you a chance to recover them. No data is overwritten. If files that share the same path are deleted, they will be renamed as numbered backups.
|
||||||
|
|
||||||
|
For more information see the [rip repository](https://github.com/nivekuil/rip).
|
||||||
|
</INLINE>
|
||||||
|
</FILE>
|
||||||
|
|
||||||
|
<FILE Run="/bin/bash" Method="remove">
|
||||||
|
<INLINE>
|
||||||
|
echo "*** Removing rip ***"
|
||||||
|
|
||||||
|
# Remove plugin related files
|
||||||
|
removepkg &name;-&version;
|
||||||
|
|
||||||
|
rm -rf &emhttp;
|
||||||
|
rm -rf &plugin;
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "*** Successfully removed rip ***"
|
||||||
|
</INLINE>
|
||||||
|
</FILE>
|
||||||
|
</PLUGIN>
|
||||||
72
unraid-dust.plg
Normal file
72
unraid-dust.plg
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
<?xml version='1.0' standalone='yes'?>
|
||||||
|
<!DOCTYPE PLUGIN [
|
||||||
|
<!ENTITY name "unraid-rip">
|
||||||
|
<!ENTITY author "dtomlinson">
|
||||||
|
<!ENTITY org "dtomlinson91">
|
||||||
|
<!ENTITY version "0.13.1">
|
||||||
|
<!ENTITY gitURL "https://github.com/&org;/&name;">
|
||||||
|
<!ENTITY pluginURL "&gitURL;/raw/master/&name;.plg">
|
||||||
|
<!ENTITY releaseURL "&gitURL;/releases/download/&version;/&name;-&version;.txz">
|
||||||
|
<!ENTITY md5 "2a6dde372dcf6c3a74bfa1c11d22875f">
|
||||||
|
<!ENTITY plugin "/boot/config/plugins/&name;">
|
||||||
|
<!ENTITY emhttp "/usr/local/emhttp/plugins/&name;">
|
||||||
|
]>
|
||||||
|
<PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="&pluginURL;" min="6.8.3">
|
||||||
|
|
||||||
|
<CHANGES>
|
||||||
|
|
||||||
|
### 2022-05-06
|
||||||
|
|
||||||
|
- Initial release - rip 0.13.1
|
||||||
|
|
||||||
|
</CHANGES>
|
||||||
|
|
||||||
|
<FILE Run="/bin/bash">
|
||||||
|
<INLINE>
|
||||||
|
<!-- remove previous version if present -->
|
||||||
|
file=$(/usr/bin/ls /boot/config/plugins/&name;/&name;*.txz | grep -v '&version;')
|
||||||
|
if [ ! -z "$file" ]
|
||||||
|
then
|
||||||
|
filename=$(basename -- $file)
|
||||||
|
previous="${filename%.*}"
|
||||||
|
echo "previous version ${previous} found - uninstalling"
|
||||||
|
removepkg $previous
|
||||||
|
rm -f $file
|
||||||
|
else
|
||||||
|
echo "no previous version found - first time install"
|
||||||
|
fi
|
||||||
|
</INLINE>
|
||||||
|
</FILE>
|
||||||
|
|
||||||
|
<FILE Name="/boot/config/plugins/&name;/&name;-&version;.txz" Run="upgradepkg --install-new">
|
||||||
|
<URL>&releaseURL;</URL>
|
||||||
|
<MD5>&md5;</MD5>
|
||||||
|
</FILE>
|
||||||
|
|
||||||
|
<FILE Name="&emhttp;/README.md">
|
||||||
|
<INLINE>
|
||||||
|
**rip**
|
||||||
|
|
||||||
|
rip is a command-line deletion tool focused on safety, ergonomics, and performance. It favors a simple interface, and does not implement the xdg-trash spec or attempt to achieve the same goals.
|
||||||
|
|
||||||
|
Deleted files get sent to the graveyard (`/tmp/graveyard-$USER` by default, see notes on changing this) under their absolute path, giving you a chance to recover them. No data is overwritten. If files that share the same path are deleted, they will be renamed as numbered backups.
|
||||||
|
|
||||||
|
For more information see the [rip repository](https://github.com/nivekuil/rip).
|
||||||
|
</INLINE>
|
||||||
|
</FILE>
|
||||||
|
|
||||||
|
<FILE Run="/bin/bash" Method="remove">
|
||||||
|
<INLINE>
|
||||||
|
echo "*** Removing rip ***"
|
||||||
|
|
||||||
|
# Remove plugin related files
|
||||||
|
removepkg &name;-&version;
|
||||||
|
|
||||||
|
rm -rf &emhttp;
|
||||||
|
rm -rf &plugin;
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "*** Successfully removed rip ***"
|
||||||
|
</INLINE>
|
||||||
|
</FILE>
|
||||||
|
</PLUGIN>
|
||||||
BIN
usr/local/emhttp/plugins/unraid-dust/images/unraid-dust.png
Normal file
BIN
usr/local/emhttp/plugins/unraid-dust/images/unraid-dust.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
Reference in New Issue
Block a user