Skip to content

Commit

Permalink
Add fclones app
Browse files Browse the repository at this point in the history
  • Loading branch information
SmartFinn committed Oct 7, 2024
1 parent 6e0cca3 commit 5504b1d
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions apps/fclones@x86_64
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env bash

set -euo pipefail

app_info() {
utils:info "Efficient Duplicate File Finder"
}

app_install() {
local version="${1:-$(app_version)}"
local package="$APP_NAME-${version#v}-linux-musl-$APP_ARCH"

utils:get_file \
"https://github.com/pkolaczk/fclones/releases/download/$version/$package.tar.gz" \
"$SDD_TEMP_DIR/$package.tar.gz"
utils:extract "$SDD_TEMP_DIR/$package.tar.gz"

cd "$SDD_TEMP_DIR/target/$APP_ARCH-unknown-linux-musl/release" || exit 1

app_remove

install -vD -m755 "$APP_NAME" "$SDD_BIN_DIR/$APP_NAME" >&2
}

app_remove() {
rm -vf "$SDD_BIN_DIR/$APP_NAME" >&2
}

app_version() {
utils:github_latest_release 'pkolaczk/fclones'
}

SCRIPT_DIR="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")"

# shellcheck source=./_utils.sh
source "$SCRIPT_DIR/_utils.sh"

utils:parser "$@"

0 comments on commit 5504b1d

Please sign in to comment.