Made user specific files created at runtime
Removed corresponding files from PKGBUILD
This commit is contained in:
parent
7b24c74f62
commit
cd3bba334b
8
PKGBUILD
8
PKGBUILD
@ -28,10 +28,10 @@ pkgver() {
|
||||
|
||||
package() {
|
||||
cd ${pkgname}
|
||||
rm -rf "${pkgdir}${HOME}/.${pkgname}"
|
||||
mkdir -p "${pkgdir}${HOME}/.${pkgname}"
|
||||
install -Dm755 paperchanger.conf.sh "${pkgdir}/etc/paperchanger.conf.sh"
|
||||
install -Dm755 current_wallpaper.txt "${pkgdir}${HOME}/.${pkgname}/current_wallpaper.txt"
|
||||
# rm -rf "${pkgdir}${HOME}/.${pkgname}"
|
||||
# mkdir -p "${pkgdir}${HOME}/.${pkgname}"
|
||||
# install -Dm755 paperchanger.conf.sh "${pkgdir}/etc/paperchanger.conf.sh"
|
||||
# install -Dm755 current_wallpaper.txt "${pkgdir}${HOME}/.${pkgname}/current_wallpaper.txt"
|
||||
install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
|
||||
install -Dm755 paperchanger.sh "${pkgdir}/usr/bin/paperchanger"
|
||||
}
|
||||
|
@ -2,9 +2,21 @@
|
||||
|
||||
# Simple CLI to make wallpaper changes with xwallpaper more comfortable
|
||||
|
||||
read -r current_file_path < $HOME/.paperchanger/current_wallpaper.txt
|
||||
mkdir -p $HOME/.paperchanger
|
||||
|
||||
source /etc/paperchanger.conf.sh
|
||||
if [[ ! -f "$HOME/.paperchanger/current_wallpaper.txt" ]]; then
|
||||
touch $HOME/.paperchanger/current_wallpaper.txt
|
||||
fi
|
||||
|
||||
|
||||
if [[ ! -f "$HOME/.paperchanger/paperchanger.conf.sh" ]]; then
|
||||
echo '# This is the configuration file used by the paperchanger program
|
||||
|
||||
default_directory=' > $HOME/.paperchanger/paperchanger.conf.sh
|
||||
fi
|
||||
|
||||
read -r current_file_path < $HOME/.paperchanger/current_wallpaper.txt
|
||||
source $HOME/.paperchanger/paperchanger.conf.sh
|
||||
|
||||
function _help() {
|
||||
echo ""
|
||||
@ -33,7 +45,7 @@ function _set() {
|
||||
}
|
||||
|
||||
function _change_config_path() {
|
||||
sed -i "s/^default_directory=.*\$/default_directory=${1//\//\\/}/" /etc/paperchanger.conf.sh
|
||||
sed -i "s/^default_directory=.*\$/default_directory=${1//\//\\/}/" $HOME/.paperchanger/paperchanger.conf.sh
|
||||
}
|
||||
|
||||
case "$#" in
|
||||
|
Loading…
Reference in New Issue
Block a user