mirror of
https://codeberg.org/privacy1st/arch
synced 2024-12-23 01:16:04 +01:00
fix locale?
This commit is contained in:
parent
6e43af43e0
commit
013ff999fb
@ -27,7 +27,8 @@ function start-docker() {
|
||||
}
|
||||
|
||||
function build-pkg() {
|
||||
sudo docker-compose run makepkg "${1}"
|
||||
# --rm: Remove container after run.
|
||||
sudo docker-compose run --rm makepkg "${1}"
|
||||
}
|
||||
|
||||
function push-pkg() {
|
||||
|
@ -1,5 +1,7 @@
|
||||
version: '3.7'
|
||||
services:
|
||||
|
||||
# usage: sudo docker-compose run --rm makepkg
|
||||
makepkg:
|
||||
build: .
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
_pkgname=locale
|
||||
_reponame=arch
|
||||
pkgname="de-p1st-$_pkgname"
|
||||
pkgver=0.0.8
|
||||
pkgver=0.0.9
|
||||
pkgrel=1
|
||||
pkgdesc="locale and timezone"
|
||||
arch=('any')
|
||||
@ -10,7 +10,7 @@ url="https://codeberg.org/privacy1st/${_reponame}"
|
||||
license=('MIT')
|
||||
depends=('holo')
|
||||
makedepends=('git')
|
||||
backup=('etc/locale.conf')
|
||||
backup=('etc/locale.conf' 'etc/localtime')
|
||||
install='.install'
|
||||
source=("git+${url}.git")
|
||||
sha256sums=('SKIP')
|
||||
@ -21,13 +21,15 @@ package() {
|
||||
# Note: The following three files are overwritten with "holo apply --force ..."
|
||||
# See ".install" script
|
||||
|
||||
# (!)
|
||||
# install -Dm0644 locale.conf "$pkgdir"/usr/share/holo/files/"$pkgname"/etc/locale.conf
|
||||
# Copy locale.conf to /etc/locale.conf so that one package owns that file
|
||||
# in this PKGBUILD, add /etc/locale.conf to backup array so that pacman does not fail if this file already exists on the filesystem
|
||||
# (a ".pacnew" file will be created in that case)
|
||||
# and then use holo with "--force" to overwrite the local version with the desired one
|
||||
install -Dm0644 locale.conf "$pkgdir"/etc/locale.conf
|
||||
install -Dm0644 locale.conf "$pkgdir"/usr/share/holo/files/"$pkgname"/etc/locale.conf
|
||||
#
|
||||
ln -sf /usr/share/zoneinfo/Europe/Berlin "$pkgdir"/etc/localtime
|
||||
ln -sf /usr/share/zoneinfo/Europe/Berlin "$pkgdir"/usr/share/holo/files/"$pkgname"/etc/localtime
|
||||
|
||||
install -Dm0644 locale.gen "$pkgdir"/usr/share/holo/files/"$pkgname"/etc/locale.gen
|
||||
|
||||
# (!)
|
||||
# ln -sf /usr/share/zoneinfo/Europe/Berlin "$pkgdir"/usr/share/holo/files/"$pkgname"/etc/localtime
|
||||
ln -sf /usr/share/zoneinfo/Europe/Berlin "$pkgdir"/etc/localtime
|
||||
}
|
||||
|
@ -1,16 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
source /etc/de-p1st-repo/arch-repo.cfg || exit
|
||||
# Enable nullglob for the case that not all patterns match, e.g. just *.zst but not *.xz packages exist.
|
||||
shopt -s nullglob
|
||||
|
||||
function main() {
|
||||
cd "${LOCAL_PKG_DIR}" || return $?
|
||||
|
||||
# check if at least one matching file exists
|
||||
# Check if at least one matching file exists
|
||||
match="0"
|
||||
for PKG in ./*.pkg.tar.{xz,zst}; do
|
||||
[ -f "$PKG" ] || { echo "There are no local packages inside ${LOCAL_PKG_DIR} for pattern $PKG"; continue; }
|
||||
|
||||
# if we are here, then there is at least one match!
|
||||
# There is at least one match!
|
||||
match="1"
|
||||
break
|
||||
done
|
||||
@ -22,28 +22,26 @@ function main() {
|
||||
|
||||
|
||||
# Get list of new packages, one package per line.
|
||||
# Enable nullglob for the case that e.g. just *.zst but not *.xz packages exist.
|
||||
shopt -s nullglob
|
||||
rsync --ignore-existing --out-format="%n" --dry-run \
|
||||
./*.pkg.tar.{xz,zst} "${REMOTE_SSH_HOST}":"${REMOTE_PKG_DIR}" > new-pkg.txt || return $?
|
||||
|
||||
# if there are no new packages to push/synchronize, then return
|
||||
# If there are no new packages to push/synchronize, then return
|
||||
if [ ! -s new-pkg.txt ]; then
|
||||
echo "No new packages inside ${LOCAL_PKG_DIR}";
|
||||
return 0;
|
||||
fi
|
||||
|
||||
|
||||
# transfer new packages using rsync
|
||||
# Transfer new packages using rsync
|
||||
rsync --ignore-existing --progress --human-readable \
|
||||
./*.pkg.tar.{xz,zst} "${REMOTE_SSH_HOST}":"${REMOTE_PKG_DIR}" || return $?
|
||||
|
||||
# transfer new-pkg.txt
|
||||
# Transfer new-pkg.txt
|
||||
rsync --ignore-times --checksum --progress --human-readable \
|
||||
new-pkg.txt "${REMOTE_SSH_HOST}":"${REMOTE_PKG_DIR}" || return $?
|
||||
|
||||
|
||||
# add each new package to database
|
||||
# Add each new package to database
|
||||
ssh "${REMOTE_SSH_HOST}" "/usr/bin/arch-repo-receive-new" || return $?
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user