This commit is contained in:
Daniel Langbein 2021-07-02 12:50:24 +02:00
parent cea65f6f67
commit e9e8d99035
9 changed files with 42 additions and 34 deletions

View File

@ -2,7 +2,7 @@
_pkgname=mkinitcpio _pkgname=mkinitcpio
_reponame=arch _reponame=arch
pkgname="de-p1st-$_pkgname" pkgname="de-p1st-$_pkgname"
pkgver=0.0.9 pkgver=0.0.10
pkgrel=1 pkgrel=1
pkgdesc="mkinitcpio configuration" pkgdesc="mkinitcpio configuration"
arch=('any') arch=('any')

View File

@ -1,9 +1,10 @@
#!/bin/sh #!/bin/sh
# stdin: default config # stdin: default config
# stdout: modified config # stdout: modified config
set -e
# save stdin (content of /etc/mkinitcpio.conf) in variable # save stdin (content of /etc/mkinitcpio.conf) in variable
stdin=$(cat) stdin="$(cat)"
# assert MODULES is empty # assert MODULES is empty
echo "$stdin" | grep --quiet '^MODULES=()' echo "$stdin" | grep --quiet '^MODULES=()'
@ -18,8 +19,8 @@ echo "$stdin" | grep --quiet '^HOOKS=(base udev autodetect modconf block filesys
echo "$stdin" | grep --quiet '^#COMPRESSION="lz4"' echo "$stdin" | grep --quiet '^#COMPRESSION="lz4"'
# 1) add to MODULES; 2 replace HOOKS; 3) uncomment lz4 COMPRESSION # 1) add to MODULES; 2 replace HOOKS; 3) uncomment lz4 COMPRESSION
sed ' echo "$stdin" | sed '
s|^MODULES=(|MODULES=(crc32c-intel |; s|^MODULES=(|MODULES=(crc32c-intel |;
s|^#COMPRESSION="lz4".*$|COMPRESSION="lz4"|; s|^#COMPRESSION="lz4".*$|COMPRESSION="lz4"|;
s|^HOOKS=(.*$|HOOKS=(base udev modconf block keyboard keymap encrypt lvm2 btrfs filesystems fsck resume)| s|^HOOKS=(.*$|HOOKS=(base udev modconf block keyboard keymap encrypt lvm2 btrfs filesystems fsck resume)|
' <<< "$stdin" '

View File

@ -2,7 +2,7 @@
_pkgname=ssh _pkgname=ssh
_reponame=arch _reponame=arch
pkgname="de-p1st-$_pkgname" pkgname="de-p1st-$_pkgname"
pkgver=0.0.7 pkgver=0.0.8
pkgrel=1 pkgrel=1
pkgdesc="ssh with configuration" pkgdesc="ssh with configuration"
arch=('any') arch=('any')

44
pkg/de-p1st-ssh/sshd_config.holoscript Normal file → Executable file
View File

@ -1,28 +1,36 @@
#!/bin/sh #!/bin/sh
# stdin: default config # stdin: default config
# stdout: modified config # stdout: modified config
set -e
# save stdin (content of /etc/ssh/sshd_config) in variable # save stdin (content of /etc/ssh/sshd_config) in variable
stdin=$(cat) stdin="$(cat)"
# assertions # assertions
echo "=== assert UsePAM ===" 1>&2
echo "$stdin" | grep --quiet '^UsePAM yes$' echo "$stdin" | grep --quiet '^UsePAM yes$'
# #
echo "$stdin" | grep --quiet '^#PermitRootLogin\s*$' echo "=== assert PermitRootLogin ===" 1>&2
! echo "$stdin" | grep --quiet '^PermitRootLogin\s*$' echo "$stdin" | grep --quiet '^#PermitRootLogin\s.*$'
echo "$stdin" | grep --quiet '^#PubkeyAuthentication\s*$' ! echo "$stdin" | grep --quiet '^PermitRootLogin\s.*$'
! echo "$stdin" | grep --quiet '^PubkeyAuthentication\s*$' echo "=== assert PubkeyAuthentication ===" 1>&2
echo "$stdin" | grep --quiet '^#PasswordAuthentication\s*$' echo "$stdin" | grep --quiet '^#PubkeyAuthentication\s.*$'
! echo "$stdin" | grep --quiet '^PasswordAuthentication\s*$' ! echo "$stdin" | grep --quiet '^PubkeyAuthentication\s.*$'
echo "$stdin" | grep --quiet '^#PermitEmptyPasswords\s*$' echo "=== assert PasswordAuthentication ===" 1>&2
! echo "$stdin" | grep --quiet '^PermitEmptyPasswords\s*$' echo "$stdin" | grep --quiet '^#PasswordAuthentication\s.*$'
echo "$stdin" | grep --quiet '^#X11Forwarding\s*$' ! echo "$stdin" | grep --quiet '^PasswordAuthentication\s.*$'
! echo "$stdin" | grep --quiet '^X11Forwarding\s*$' echo "=== assert PermitEmptyPasswords ===" 1>&2
echo "$stdin" | grep --quiet '^#PermitEmptyPasswords\s.*$'
! echo "$stdin" | grep --quiet '^PermitEmptyPasswords\s.*$'
echo "=== assert X11Forwarding ===" 1>&2
echo "$stdin" | grep --quiet '^#X11Forwarding\s.*$'
! echo "$stdin" | grep --quiet '^X11Forwarding\s.*$'
sed ' echo "=== sed ===" 1>&2
s|^#PermitRootLogin\s*$|PermitRootLogin no|; echo "$stdin" | sed '
s|^#PubkeyAuthentication\s*$|PubkeyAuthentication yes|; s|^#PermitRootLogin\s.*$|PermitRootLogin no|;
s|^#PasswordAuthentication\s*$|PasswordAuthentication no|; s|^#PubkeyAuthentication\s.*$|PubkeyAuthentication yes|;
s|^#PermitEmptyPasswords\s*$|PermitEmptyPasswords no|; s|^#PasswordAuthentication\s.*$|PasswordAuthentication no|;
s|^#X11Forwarding\s*$|X11Forwarding no| s|^#PermitEmptyPasswords\s.*$|PermitEmptyPasswords no|;
' <<< "$stdin" s|^#X11Forwarding\s.*$|X11Forwarding no|
'

View File

@ -2,7 +2,7 @@
_pkgname=xfce4-hidpi _pkgname=xfce4-hidpi
_reponame=arch _reponame=arch
pkgname="de-p1st-$_pkgname" pkgname="de-p1st-$_pkgname"
pkgver=0.0.8 pkgver=0.0.9
pkgrel=1 pkgrel=1
pkgdesc="HiDPI for XFCE4" pkgdesc="HiDPI for XFCE4"
arch=('any') arch=('any')

View File

@ -2,11 +2,8 @@
# stdin: default config # stdin: default config
# stdout: modified config # stdout: modified config
# save stdin in variable
stdin=$(cat)
# Decrease size # Decrease size
sed ' sed '
s|<!-- Anchor1 for de-p1st-xfce4-hidpi -->|<property name="last-icon-view-zoom-level" type="string" value="THUNAR_ZOOM_LEVEL_75_PERCENT"/>|; s|<!-- Anchor1 for de-p1st-xfce4-hidpi -->|<property name="last-icon-view-zoom-level" type="string" value="THUNAR_ZOOM_LEVEL_75_PERCENT"/>|;
s|<!-- Anchor2 for de-p1st-xfce4-hidpi -->|<property name="last-details-view-zoom-level" type="string" value="THUNAR_ZOOM_LEVEL_50_PERCENT"/>|; s|<!-- Anchor2 for de-p1st-xfce4-hidpi -->|<property name="last-details-view-zoom-level" type="string" value="THUNAR_ZOOM_LEVEL_50_PERCENT"/>|;
' <<< "$stdin" '

View File

@ -1,9 +1,10 @@
#!/bin/sh #!/bin/sh
# stdin: default config # stdin: default config
# stdout: modified config # stdout: modified config
set -e
# save stdin in variable # save stdin in variable
stdin=$(cat) stdin="$(cat)"
# assert WindowScalingFactor is as expected # assert WindowScalingFactor is as expected
echo "$stdin" | grep --quiet '<property name="WindowScalingFactor" type="int" value="1"/>' echo "$stdin" | grep --quiet '<property name="WindowScalingFactor" type="int" value="1"/>'
@ -13,7 +14,7 @@ echo "$stdin" | grep --quiet '<property name="CursorThemeSize" type="int" value=
# 1. Double WindowScalingFactor # 1. Double WindowScalingFactor
# 2.Increase cursor size to 32 # 2.Increase cursor size to 32
sed ' echo "$stdin" | sed '
s|<property name="WindowScalingFactor" type="int" value="1"/>|<property name="WindowScalingFactor" type="int" value="2"/>|; s|<property name="WindowScalingFactor" type="int" value="1"/>|<property name="WindowScalingFactor" type="int" value="2"/>|;
s|<property name="CursorThemeSize" type="int" value="0"/>|<property name="CursorThemeSize" type="int" value="32"/>|; s|<property name="CursorThemeSize" type="int" value="0"/>|<property name="CursorThemeSize" type="int" value="32"/>|;
' <<< "$stdin" '

View File

@ -2,7 +2,7 @@
_pkgname=xfce4 _pkgname=xfce4
_reponame=arch _reponame=arch
pkgname="de-p1st-$_pkgname" pkgname="de-p1st-$_pkgname"
pkgver=0.0.26 pkgver=0.0.27
pkgrel=1 pkgrel=1
pkgdesc="XFCE4 with configuration" pkgdesc="XFCE4 with configuration"
arch=('any') arch=('any')

View File

@ -1,12 +1,13 @@
#!/bin/sh #!/bin/sh
# stdin: default config # stdin: default config
# stdout: modified config # stdout: modified config
set -e
# save stdin (content of /etc/mkinitcpio.conf) in variable # save stdin (content of /etc/mkinitcpio.conf) in variable
stdin=$(cat) stdin="$(cat)"
# assert a screenshot for key-combination "Print" exists # assert a screenshot for key-combination "Print" exists
echo "$stdin" | grep --quiet '^\s*<property name="Print" type="string" value="xfce4-screenshooter"/>\s*$' echo "$stdin" | grep --quiet '^\s*<property name="Print" type="string" value="xfce4-screenshooter"/>\s*$'
# replace action key-combination "Print" # replace action key-combination "Print"
sed 's|<property name="Print" type="string" value="xfce4-screenshooter"/>|<property name="Print" type="string" value="sh -c &apos;xfce4-screenshooter -f -s &quot;Pictures/$(date +%Y%m%d_%H%M%S).png&quot;&apos;"/>|' <<< "$stdin" echo "$stdin" | sed 's|<property name="Print" type="string" value="xfce4-screenshooter"/>|<property name="Print" type="string" value="sh -c &apos;xfce4-screenshooter -f -s &quot;Pictures/$(date +%Y%m%d_%H%M%S).png&quot;&apos;"/>|'