1
0
Fork 0

use shell command to create parent dir

master
Florian Schrofner 2024-11-17 14:05:07 +01:00
parent a6c47742a6
commit ec154a0467
1 changed files with 8 additions and 7 deletions

View File

@ -39,20 +39,21 @@
(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] (defn- link-config-file [src dest]
;; make sure the parent directory of destination file exists ;; make sure the parent directory of destination file exists
(-> (fs/file dest) (fs/parent) (fs/create-dirs)) (safe-sh-as-user "mkdir" "-p" dest)
(safe-sh-as-user "ln" "-fs" src dest)) (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..")
(copy-config-file (str script-base-dir "/configs/config-files/wallpaper.jpg") "~/Pictures/wallpaper.jpg") (link-config-file (str script-base-dir "/configs/config-files/wallpaper.jpg") "~/Pictures/wallpaper.jpg")
(copy-config-file (str script-base-dir "/configs/config-files/bspwm-config") "~/.config/bspwm/bspwmrc") (println "linking config files..")
(copy-config-file (str script-base-dir "/configs/config-files/picom-config") "~/.config/picom/picom.conf") (link-config-file (str script-base-dir "/configs/config-files/bspwm-config") "~/.config/bspwm/bspwmrc")
(copy-config-file (str script-base-dir "/configs/config-files/alacritty-config") "~/.config/alacritty/alacritty.toml") (link-config-file (str script-base-dir "/configs/config-files/picom-config") "~/.config/picom/picom.conf")
(copy-config-file (str script-base-dir "/configs/config-files/sxhkd-config") "~/.config/sxhkd/sxhkdrc")) (link-config-file (str script-base-dir "/configs/config-files/alacritty-config") "~/.config/alacritty/alacritty.toml")
(link-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..")