@ -32,7 +32,6 @@ declare -gA PACKAGE_METADATA
# Initialize default configuration.
# Initialize default configuration.
DEBFILES_DIR_PATH = " $TERMUX_PACKAGES_BASEDIR /debs "
DEBFILES_DIR_PATH = " $TERMUX_PACKAGES_BASEDIR /debs "
PACKAGE_DELETE_MODE = false
PACKAGE_DELETE_MODE = false
KEEP_OLD_VERSION = false
# Bintray-specific configuration.
# Bintray-specific configuration.
BINTRAY_REPO_NAME = "termux-packages-24"
BINTRAY_REPO_NAME = "termux-packages-24"
@ -170,11 +169,6 @@ upload_package() {
exit 1
exit 1
fi
fi
if ! $KEEP_OLD_VERSION ; then
# Delete entry for package (with all related debfiles).
delete_package " $package_name "
fi
# Create new entry for package.
# Create new entry for package.
echo -n " [@] Creating entry for version ' ${ PACKAGE_METADATA [ 'VERSION_FULL' ] } ' of package ' $package_name '... " >& 2
echo -n " [@] Creating entry for version ' ${ PACKAGE_METADATA [ 'VERSION_FULL' ] } ' of package ' $package_name '... " >& 2
curl_response = $(
curl_response = $(
@ -403,17 +397,6 @@ show_usage() {
echo "Primarily indended to be used by Gitlab CI for automatic"
echo "Primarily indended to be used by Gitlab CI for automatic"
echo "package uploads but it can be used for manual uploads too."
echo "package uploads but it can be used for manual uploads too."
echo
echo
echo "By default, this script will create a new version entries"
echo "for specified packages and upload *.deb files for each of"
echo "created entries."
echo
echo "Note that if version entry already exists, it will be"
echo "deleted with all associated *.deb files to prevent file"
echo "name collisions and wasting of available space."
echo
echo "If such behaviour is unwanted, use option '-k' which will"
echo "not touch available versions."
echo
echo "Before using this script, check that you have all"
echo "Before using this script, check that you have all"
echo "necessary credentials for accessing repository."
echo "necessary credentials for accessing repository."
echo
echo
@ -434,12 +417,6 @@ show_usage() {
echo
echo
echo " -h, --help Print this help."
echo " -h, --help Print this help."
echo
echo
echo " -k, --keep-old Prevent deletion of previous versions"
echo " when submitting package. Useful when"
echo " doing uploads within same package"
echo " versions or just to make downgrading"
echo " possible."
echo
echo " -p, --path [path] Specify a directory containing *.deb"
echo " -p, --path [path] Specify a directory containing *.deb"
echo " files ready for uploading."
echo " files ready for uploading."
echo " Default is './debs'."
echo " Default is './debs'."
@ -450,7 +427,7 @@ show_usage() {
###################################################################
###################################################################
while getopts ":-:hdk p:" opt; do
while getopts ":-:hdp:" opt; do
case " $opt " in
case " $opt " in
-)
-)
case " $OPTARG " in
case " $OPTARG " in
@ -477,9 +454,6 @@ while getopts ":-:hdkp:" opt; do
exit 1
exit 1
fi
fi
; ;
; ;
keep-old)
KEEP_OLD_VERSION = true
; ;
*)
*)
echo " [!] Invalid option ' $OPTARG '. " >& 2
echo " [!] Invalid option ' $OPTARG '. " >& 2
show_usage
show_usage
@ -494,9 +468,6 @@ while getopts ":-:hdkp:" opt; do
show_usage
show_usage
exit 0
exit 0
; ;
; ;
k)
KEEP_OLD_VERSION = true
; ;
p)
p)
DEBFILES_DIR_PATH = " ${ OPTARG } "
DEBFILES_DIR_PATH = " ${ OPTARG } "
if [ ! -d " $DEBFILES_DIR_PATH " ] ; then
if [ ! -d " $DEBFILES_DIR_PATH " ] ; then