Repotool

Installation

A guide to install Repotool.

Prerequisites

To run Repotool, you need to meet the following prerequisites:

  • Platform
    • Linux
    • Windows
    • macOS (not tested)
  • Java Runtime Environment (JRE) >= 21

Download

To get the latest version of Repotool, check the release page at Codeberg.

Assuming you want to download v0.0.1:

wcurl https://codeberg.org/Katastima/repotool/releases/download/v0.0.1/repotool_v0.0.1.jar

# (optional) verify signature
wcurl https://codeberg.org/Katastima/repotool/releases/download/v0.0.1/repotool_v0.0.1.jar.asc
gpg --verify repotool_v0.0.1.jar.asc

Run

You can run the downloaded jar file directly using java -jar:

Usage
java -jar repotool.jar

Create a wrapper

You could also create a wrapper to launch it.

Assuming you have downloaded the release to ~/repotool.jar:

repotool
#!/bin/bash

#
# SPDX-FileCopyrightText: Katastima Authors
# SPDX-License-Identifier: EUPL-1.2
#

### The path to the downloaded repotool_vX.Y.Z.jar.
REPOTOOL_CLI_FILE="~/repotool.jar"

### In case you want to specify additional java options.
JAVA_OPTS=""

## For example, use a custom logback logger config:
#JAVA_OPTS="-Dlogback.configurationFile=logback.xml"

## Or if you get the native access warnings:
#JAVA_OPTS="--enable-native-access=ALL-UNNAMED"

## Or you want to combine both:
#JAVA_OPTS="--enable-native-access=ALL-UNNAMED -Dlogback.configurationFile=logback.xml"

if [ -n "$JAVA_OPTS" ]; then
  java "${JAVA_OPTS}" -jar "${REPOTOOL_CLI_FILE}" "$@"
else
  java -jar "${REPOTOOL_CLI_FILE}" "$@"
fi

Place above wrapper into your path as repotool and make it executable to be able to use it.

Command completion

Repotool supports generating command completion for the following shells:

You need to create a wrapper and place it in your path to make use of it.

To create command completion files for your shell:

repotool --generate-completion=bash

Save the output to a file and source it with your shell to enable command completion.

Example for bash
# Create ~/.bashrc.d if it does not exist.
mkdir -p ~/.bashrc.d

# Generate command completion and place it inside ~/.bashrc.d to automagically
# pick it up everytime you log in.
repotool --generate-completion=bash > ~/.bashrc.d/repotool-completion.sh

# (optional) source after initial generation without having to relaunch your shell.
source ~/.bashrc.d/repotool-completion.sh
It is recommended to generate the completion everytime you update to a new release of repotool.jar to ensure your completion is up-to-date.
Copyright © 0 Katastima Authors.