Move files to category subdirs, and add shuffle script
This commit is contained in:
parent
7c55a439c2
commit
93996e58f8
11
PKGBUILD
11
PKGBUILD
|
@ -1,6 +1,6 @@
|
|||
# Maintainer: David Thurstenson <thurstylark@gmail.com>
|
||||
pkgname=tl-wallpaper
|
||||
pkgver=r15.b6ed6fc
|
||||
pkgver=r16.7ec3d15
|
||||
pkgrel=1
|
||||
pkgdesc="Thurstylark's collection of wallpapers"
|
||||
arch=(any)
|
||||
|
@ -18,6 +18,11 @@ pkgver() {
|
|||
package() {
|
||||
cd ${srcdir}/${pkgname}
|
||||
install -d "${pkgdir}/usr/share/backgrounds/thurstylark/"
|
||||
install -m644 *.jpg "${pkgdir}/usr/share/backgrounds/thurstylark/"
|
||||
install -m644 *.png "${pkgdir}/usr/share/backgrounds/thurstylark/"
|
||||
|
||||
install -m755 "tl-wallpaper-shuf.bash" "${pkgdir}/usr/share/backgrounds/thurstylark/"
|
||||
|
||||
for i in $(find . -type f \( -iname \*.jpg -o -iname \*.png \) -printf '%f ' ); do
|
||||
install -d "${pkgdir}/usr/share/backgrounds/thurstylark/${i%%-*}"
|
||||
install -m644 "$i" "${pkgdir}/usr/share/backgrounds/thurstylark/${i%%-*}/"
|
||||
done
|
||||
}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Start in the script's pwd
|
||||
# (ideally something like /usr/share/wallpapers/thurstylark/)
|
||||
wallp_dir=$(dirname "$0")
|
||||
|
||||
# Get one subdir from $wallp_dir
|
||||
wallp_subdir=$(find "$wallp_dir" -type d | shuf -n 1)
|
||||
|
||||
# Get one file from $wallp_subdir
|
||||
find $walp_subdir -type f \( -iname \*.jpg -o -iname \*.png \) | shuf -n 1
|
Loading…
Reference in New Issue