You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
deltachat-desktop/repo-update.sh

39 lines
783 B

#!/bin/sh
set -e
if [ $# -eq 0 ]; then
echo "No arguments provided. Aborting..."
exit 1
fi
if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo "usage: ./repo-update.sh [-h] [REPO_PATH TEMP_DIR]
Deploys packages for you.
Possible values for the arguments:
REPO_PATH path of the repositpry
TEMP_DIR path of the temporary folder
Dependencies: -
"
exit 0
fi
4 years ago
if [ $# -lt 2 ]; then
echo "Mandatory arguments: 'REPO_PATH', 'TEMP_DIR'. Aborting..."
exit 1
fi
REPO_PATH="${1}"
TEMP_DIR="${2}"
initial_position="$(pwd)"
cd "${REPO_PATH}"
apt-ftparchive packages . > "${TEMP_DIR}/Packages"
cd "${initial_position}"
gzip -k -f "${TEMP_DIR}/Packages" --to-stdout > "${TEMP_DIR}/Packages.gz"
apt-ftparchive release "${TEMP_DIR}" > "${TEMP_DIR}/Release"