mirror of
https://github.com/arcan1s/dotfiles.git
synced 2025-04-24 16:07:17 +00:00
added repo-update
This commit is contained in:
parent
fc877e4598
commit
011e0bcb4e
@ -13,6 +13,7 @@ Description
|
|||||||
* `kdmrc` - settings for KDM. It is stored as `/usr/share/config/kdm/kdmrc`.
|
* `kdmrc` - settings for KDM. It is stored as `/usr/share/config/kdm/kdmrc`.
|
||||||
* `local.conf` - custom settings for fontconfig. It is stored as `/etc/fonts/local.conf`
|
* `local.conf` - custom settings for fontconfig. It is stored as `/etc/fonts/local.conf`
|
||||||
* `qtcurve` (directory) - custom settings for QtCurve (including colors).
|
* `qtcurve` (directory) - custom settings for QtCurve (including colors).
|
||||||
|
* `repo-update` - simple script for building and updating own repository
|
||||||
* `sakura.conf` - settings for [Sakura terminal](https://launchpad.net/sakura). It is stored in `$HOME/.config/sakura/`.
|
* `sakura.conf` - settings for [Sakura terminal](https://launchpad.net/sakura). It is stored in `$HOME/.config/sakura/`.
|
||||||
* `vimrc` - settings for VIM. It is stored as `$HOME/.vimrc`.
|
* `vimrc` - settings for VIM. It is stored as `$HOME/.vimrc`.
|
||||||
* `Xresources` - settings for some Xorg applications (for example, urxvt). It is stored as `$HOME/.Xresources`
|
* `Xresources` - settings for some Xorg applications (for example, urxvt). It is stored as `$HOME/.Xresources`
|
||||||
|
@ -114,7 +114,7 @@ round=extra
|
|||||||
roundAllTabs=false
|
roundAllTabs=false
|
||||||
roundMbTopOnly=true
|
roundMbTopOnly=true
|
||||||
sbarBgndAppearance=flat
|
sbarBgndAppearance=flat
|
||||||
scrollbarType=kde
|
scrollbarType=none
|
||||||
selectionAppearance=harsh
|
selectionAppearance=harsh
|
||||||
shadeCheckRadio=none
|
shadeCheckRadio=none
|
||||||
shadeMenubarOnlyWhenActive=false
|
shadeMenubarOnlyWhenActive=false
|
||||||
|
84
repo-update
Executable file
84
repo-update
Executable file
@ -0,0 +1,84 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# variables
|
||||||
|
DBNAME="arcanisrepo"
|
||||||
|
PREPAREDIR="${HOME}/arch/prepare"
|
||||||
|
REPODIR="${HOME}/arch/repo"
|
||||||
|
ROOTDIR="${HOME}/arch/root"
|
||||||
|
STAGINGDIR="${HOME}/arch/staging"
|
||||||
|
|
||||||
|
# functions
|
||||||
|
func_remove() {
|
||||||
|
DBPATH="$1"
|
||||||
|
PKGNAME="$2"
|
||||||
|
/usr/bin/repo-remove ${DBNAME}.db.tar.gz ${PKGNAME}
|
||||||
|
/usr/bin/repo-remove ${DBNAME}.files.tar.gz ${PKGNAME}
|
||||||
|
/usr/bin/rm -f ${PKGNAME}*
|
||||||
|
}
|
||||||
|
func_build() {
|
||||||
|
PREPARE="$1"
|
||||||
|
ROOT="$2"
|
||||||
|
if grep "arch=('any')" PKGBUILD -q; then
|
||||||
|
/usr/bin/sudo /usr/bin/staging-i686-build -r "${ROOT}"
|
||||||
|
else
|
||||||
|
/usr/bin/sudo /usr/bin/staging-i686-build -r "${ROOT}"
|
||||||
|
/usr/bin/sudo /usr/bin/staging-x86_64-build -r "${ROOT}"
|
||||||
|
fi
|
||||||
|
/usr/bin/cp *.pkg.tar.xz "${PREPARE}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# error checking
|
||||||
|
if [ ! -d "${PREPAREDIR}" ]; then
|
||||||
|
echo "Prepare directory does not exist"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ ! -d "${REPODIR}" ] || [ ! -d "${REPODIR}/i686" ] || [ ! -d "${REPODIR}/x86_64" ]; then
|
||||||
|
echo "Repository directory does not exist"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ ! -d "${STAGINGDIR}" ]; then
|
||||||
|
echo "Staging directory does not exist"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# building
|
||||||
|
/usr/bin/cd "${STAGINGDIR}"
|
||||||
|
/usr/bin/find -name PKGBUILD -type f -execdir func_build "${PREPAREDIR}" "${ROOTDIR}" \;
|
||||||
|
|
||||||
|
# signing
|
||||||
|
/usr/bin/cd "${PREPAREDIR}"
|
||||||
|
for PACKAGE in $(/usr/bin/ls *.pkg.tar.xz); do
|
||||||
|
/usr/bin/gpg -b ${PACKAGE}
|
||||||
|
done
|
||||||
|
|
||||||
|
# creating packages list
|
||||||
|
i686_PACKAGES=$(/usr/bin/ls *.pkg.tar.xz | /usr/bin/grep "i686\|any")
|
||||||
|
x86_64_PACKAGES=$(/usr/bin/ls *.pkg.tar.xz | /usr/bin/grep "x86_64\|any")
|
||||||
|
echo "i686 packages: ${i686_PACKAGES}"
|
||||||
|
echo "x86_64 packages: ${x86_64_PACKAGES}"
|
||||||
|
|
||||||
|
# updating i686 repo
|
||||||
|
/usr/bin/cd "${REPODIR}/i686"
|
||||||
|
for PACKAGE in ${i686_PACKAGES}; do
|
||||||
|
PKGNAME=$(echo ${PACKAGE} | /usr/bin/awk -F '-' '{for(i=1; i<=NF-3;i++) {printf("%s-", $i);}}' | /usr/bin/sed 's/.$//')
|
||||||
|
/usr/bin/ls ${PKGNAME}* && func_remove "${DBNAME}" "${PKGNAME}"
|
||||||
|
/usr/bin/cp "${PREPAREDIR}/${PACKAGE}"{,.sig} .
|
||||||
|
done
|
||||||
|
/usr/bin/repo-add --new ${DBNAME}.db.tar.gz *.pkg.tar.xz
|
||||||
|
/usr/bin/repo-add --new --files ${DBNAME}.files.tar.gz *.pkg.tar.xz
|
||||||
|
|
||||||
|
# updating x86_64 repo
|
||||||
|
/usr/bin/cd "${REPODIR}/x86_64"
|
||||||
|
for PACKAGE in ${x86_64_PACKAGES}; do
|
||||||
|
PKGNAME=$(echo ${PACKAGE} | /usr/bin/awk -F '-' '{for(i=1; i<=NF-3;i++) {printf("%s-", $i);}}' | /usr/bin/sed 's/.$//')
|
||||||
|
/usr/bin/ls ${PKGNAME}* && func_remove "${DBNAME}" "${PKGNAME}"
|
||||||
|
/usr/bin/cp "${PREPAREDIR}/${PACKAGE}"{,.sig} .
|
||||||
|
done
|
||||||
|
/usr/bin/repo-add --new ${DBNAME}.db.tar.gz *.pkg.tar.xz
|
||||||
|
/usr/bin/repo-add --new --files ${DBNAME}.files.tar.gz *.pkg.tar.xz
|
||||||
|
|
||||||
|
# clear
|
||||||
|
/usr/bin/cd "${PREPAREDIR}"
|
||||||
|
/usr/bin/rm -rf *
|
||||||
|
/usr/bin/cd "${STAGINGDIR}"
|
||||||
|
/usr/bin/rm -rf *
|
Loading…
Reference in New Issue
Block a user