1
0
Fork 0

make sure parent dir of config file exists

master
Florian Schrofner 2024-11-17 13:54:04 +01:00
parent 379bc0070a
commit a6c47742a6
1 changed files with 9 additions and 5 deletions

View File

@ -39,16 +39,20 @@
(safe-sh "chown" "-R" (str user ":" user) android-scripts-dir) (safe-sh "chown" "-R" (str user ":" user) android-scripts-dir)
(safe-sh-as-user "git" "clone" "ssh://git@git.schro.fi:4242/schrofi/android-scripts.git" android-scripts-dir))) (safe-sh-as-user "git" "clone" "ssh://git@git.schro.fi:4242/schrofi/android-scripts.git" android-scripts-dir)))
(defn- copy-config-file [src dest]
;; make sure the parent directory of destination file exists
(-> (fs/file dest) (fs/parent) (fs/create-dirs))
(safe-sh-as-user "ln" "-fs" src dest))
(defn- link-config-files [] (defn- link-config-files []
(println "setting gtk theme..") (println "setting gtk theme..")
(safe-sh-as-user "ln" "-fs" (str script-base-dir "/configs/config-files/gtk-config") "~/.gtkrc-2.0") (safe-sh-as-user "ln" "-fs" (str script-base-dir "/configs/config-files/gtk-config") "~/.gtkrc-2.0")
(println "linking wallpaper..") (println "linking wallpaper..")
(safe-sh-as-user "ln" "-fs" (str script-base-dir "/configs/config-files/wallpaper.jpg") "~/Pictures/wallpaper.jpg") (copy-config-file (str script-base-dir "/configs/config-files/wallpaper.jpg") "~/Pictures/wallpaper.jpg")
(safe-sh-as-user "ln" "-fs" (str script-base-dir "/configs/config-files/bspwm-config") "~/.config/bspwm/bspwmrc") (copy-config-file (str script-base-dir "/configs/config-files/bspwm-config") "~/.config/bspwm/bspwmrc")
(safe-sh-as-user "ln" "-fs" (str script-base-dir "/configs/config-files/picom-config") "~/.config/picom/picom.conf") (copy-config-file (str script-base-dir "/configs/config-files/picom-config") "~/.config/picom/picom.conf")
(safe-sh-as-user "ln" "-fs" (str script-base-dir "/configs/config-files/alacritty-config") "~/.config/alacritty/alacritty.toml") (copy-config-file (str script-base-dir "/configs/config-files/alacritty-config") "~/.config/alacritty/alacritty.toml")
(safe-sh-as-user "ln" "-fs" (str script-base-dir "/configs/config-files/sxhkd-config") "~/.config/sxhkd/sxhkdrc")) (copy-config-file (str script-base-dir "/configs/config-files/sxhkd-config") "~/.config/sxhkd/sxhkdrc"))
(defn- setup-system-services [] (defn- setup-system-services []
(println "setting up system services..") (println "setting up system services..")