[arch-commits] Commit in calibre/trunk (3 files)
Eli Schwartz
eschwartz at archlinux.org
Mon Oct 5 19:17:57 UTC 2020
Date: Monday, October 5, 2020 @ 19:17:56
Author: eschwartz
Revision: 718934
calibre: remove outdated files no longer needed in packaging
Deleted:
calibre/trunk/calibre-alternatives.sh
calibre/trunk/calibre-common.install
calibre/trunk/calibre.install
-------------------------+
calibre-alternatives.sh | 61 ----------------------------------------------
calibre-common.install | 11 --------
calibre.install | 14 ----------
3 files changed, 86 deletions(-)
Deleted: calibre-alternatives.sh
===================================================================
--- calibre-alternatives.sh 2020-10-05 19:17:44 UTC (rev 718933)
+++ calibre-alternatives.sh 2020-10-05 19:17:56 UTC (rev 718934)
@@ -1,61 +0,0 @@
-#!/bin/sh
-
-libdir=/usr/lib/calibre
-
-die() {
- echo "${1}" >&2
- exit 1
-}
-
-usage() {
- cat <<- __EOF__
- usage: calibre-alternatives [help|get]
- usage: calibre-alternatives set [2|3]
-
- Set the default python interpreter for calibre, either python2 or python3.
-__EOF__
-}
-
-get_current() {
- currentdir=$(readlink "${libdir}/bin")
- echo "${currentdir##*-py}"
-}
-
-find_alternative() {
- for i in 2 3; do
- if [ -d "${libdir}/bin-py${i}" ]; then
- echo "${i}"
- return 0
- fi
- done
- return 1
-}
-
-set_current() {
- alt=${1}
- if [ -z "${alt}" ]; then
- [ -z "$(get_current)" ] || exit 0 # nothing to do
- alt=$(find_alternative) || die "error: no alternatives exist"
- fi
-
- if ! [ $(id -u) = 0 ]; then
- die "error: cannot set without being root"
- fi
-
- if [ -d "${libdir}/bin-py${alt}" ]; then
- ln -snvf bin-py${alt} "${libdir}/bin"
- else
- die "alternative '${alt}' does not exist"
- fi
-}
-
-case ${1} in
- ''|help)
- usage;;
- get)
- get_current;;
- set)
- shift; set_current "${1}";;
- *)
- die "invalid option: '${1}'"
-esac
Deleted: calibre-common.install
===================================================================
--- calibre-common.install 2020-10-05 19:17:44 UTC (rev 718933)
+++ calibre-common.install 2020-10-05 19:17:56 UTC (rev 718934)
@@ -1,11 +0,0 @@
-post_install() {
- echo '=> calibre and calibre-python3 are now co-installable'
- echo '=> use `calibre-alternatives set [2|3]` to switch between them'
-}
-
-post_remove() {
- if [ -e /usr/lib/calibre/bin ]; then
- rm /usr/lib/calibre/bin
- rmdir /usr/lib/calibre/
- fi
-}
Deleted: calibre.install
===================================================================
--- calibre.install 2020-10-05 19:17:44 UTC (rev 718933)
+++ calibre.install 2020-10-05 19:17:56 UTC (rev 718934)
@@ -1,14 +0,0 @@
-post_install() {
- calibre-alternatives set
-}
-
-post_upgrade() {
- calibre-alternatives set
-}
-
-post_remove() {
- if [ ! -e /usr/lib/calibre/bin ]; then
- rm -f /usr/lib/calibre/bin
- calibre-alternatives set 2>/dev/null || true
- fi
-}
More information about the arch-commits
mailing list