install http toolkit
parent
db7b08be15
commit
017e064175
|
@ -12,7 +12,7 @@
|
||||||
(def home (str "/home/" user))
|
(def home (str "/home/" user))
|
||||||
|
|
||||||
(def packages {
|
(def packages {
|
||||||
:base ["bluez" "chromium" "emacs-gtk3" "fish-shell" "firefox" "flameshot" "flatpak" "git" "htop" "i3" "pass" "ranger" "Signal-Desktop" "thunar-archive-plugin" "wget" "xarchiver" "xclip" "xfce4-i3-workspaces-plugin"]
|
:base ["bluez" "chromium" "curl" "emacs-gtk3" "fish-shell" "firefox" "flameshot" "flatpak" "git" "htop" "i3" "pass" "ranger" "Signal-Desktop" "thunar-archive-plugin" "unzip" "wget" "xarchiver" "xclip" "xfce4-i3-workspaces-plugin"]
|
||||||
:work ["kotlin-bin" "scrcpy"]
|
:work ["kotlin-bin" "scrcpy"]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -21,8 +21,6 @@
|
||||||
:game ["com.discordapp.Discord"]
|
:game ["com.discordapp.Discord"]
|
||||||
})
|
})
|
||||||
|
|
||||||
(def toolbox-link "https://download.jetbrains.com/toolbox/jetbrains-toolbox-2.1.1.18388.tar.gz")
|
|
||||||
|
|
||||||
;;todo: allow to pick specific package sets later
|
;;todo: allow to pick specific package sets later
|
||||||
|
|
||||||
;;installing normal xbps packages
|
;;installing normal xbps packages
|
||||||
|
@ -38,17 +36,38 @@
|
||||||
(apply safe-sh (concat ["flatpak" "install" "flathub" "--noninteractive"] packages-to-install)))
|
(apply safe-sh (concat ["flatpak" "install" "flathub" "--noninteractive"] packages-to-install)))
|
||||||
(println "flatpak packages installed")
|
(println "flatpak packages installed")
|
||||||
|
|
||||||
|
|
||||||
|
(def toolbox-link "https://download.jetbrains.com/toolbox/jetbrains-toolbox-2.1.1.18388.tar.gz")
|
||||||
|
|
||||||
|
(def http-toolkit-version "1.14.8")
|
||||||
|
(def http-toolkit-link (str "https://github.com/httptoolkit/httptoolkit-desktop/releases/download/v" http-toolkit-version "/HttpToolkit-linux-x64-" http-toolkit-version ".zip"))
|
||||||
|
|
||||||
|
(defn- install-application [link filename target-directory extract-command]
|
||||||
|
(let [download-file-path (str home "/Downloads/" filename)
|
||||||
|
download-file (fs/file download-file-path)]
|
||||||
|
(safe-sh "wget" "-O" download-file-path link)
|
||||||
|
(fs/delete-tree target-directory)
|
||||||
|
(fs/create-dirs target-directory)
|
||||||
|
(extract-command download-file-path target-directory)
|
||||||
|
(fs/delete download-file)
|
||||||
|
(safe-sh "chown" (str user ":" user) "-R" target-directory)))
|
||||||
|
|
||||||
;;installing jetbrains toolbox
|
;;installing jetbrains toolbox
|
||||||
(println "installing jetbrains toolbox..")
|
(println "installing jetbrains toolbox..")
|
||||||
(let [download-file-path (str home "/Downloads/toolbox.tar.gz")
|
(let [target-directory (str home "/Applications/JetbrainsToolbox")]
|
||||||
target-directory (str home "/Applications/JetbrainsToolbox")
|
(install-application
|
||||||
download-file (fs/file download-file-path)]
|
toolbox-link
|
||||||
(safe-sh "wget" "-O" download-file-path toolbox-link)
|
"toolbox.tar.gz"
|
||||||
(fs/delete-tree target-directory)
|
target-directory
|
||||||
(fs/create-dirs target-directory)
|
#(safe-sh "tar" "-xzf" %1 "-C" %2)))
|
||||||
(safe-sh "tar" "-xzf" download-file-path "-C" target-directory)
|
|
||||||
(fs/delete download-file)
|
|
||||||
(safe-sh "chown" (str user ":" user) "-R" target-directory))
|
|
||||||
(println "jetbrains toolbox installed")
|
(println "jetbrains toolbox installed")
|
||||||
|
|
||||||
;;todo: installing http toolkit
|
;;installing http toolkit
|
||||||
|
(println "installing http toolkit..")
|
||||||
|
(let [target-directory (str home "/Applications/HttpToolkit")]
|
||||||
|
(install-application
|
||||||
|
http-toolkit-link
|
||||||
|
"httptoolkit.zip"
|
||||||
|
target-directory
|
||||||
|
#(safe-sh "unzip" %1 "-d" %2)))
|
||||||
|
(println "http toolkit installed")
|
||||||
|
|
Loading…
Reference in New Issue