-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ac59f5a
commit 9f9815a
Showing
85 changed files
with
689 additions
and
477 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,7 @@ vendor | |
bin/* | ||
!bin/lipo* | ||
!bin/README.md | ||
builder.exe | ||
packwiz-installer.jar | ||
install | ||
server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,93 +1,93 @@ | ||
- [Chat Heads](https://modrinth.com/mod/Wb5oqrBJ/version/5DNklSQc) | ||
- [ShulkerBoxTooltip](https://modrinth.com/mod/2M01OLQq/version/Ah2mQcI5) | ||
- [MidnightLib](https://modrinth.com/mod/codAaoxh/version/WQMjF7Uk) | ||
- [Drip Sounds (Fabric)](https://modrinth.com/mod/T8MMXTpr/version/7GB1hLrr) | ||
- [Entity Texture Features](https://modrinth.com/mod/BVzZfTc1/version/DpEWP7FH) | ||
- [lazy-language-loader](https://modrinth.com/mod/Nz0RSWrF/version/VkswlqCU) | ||
- [Main Menu Credits](https://modrinth.com/mod/qJDfP7WN/version/hWX5REu6) | ||
- [FerriteCore](https://modrinth.com/mod/uXXizFIs/version/FCnCG6PS) | ||
- [LibJF](https://www.curseforge.com/minecraft/mc-mods/libjf/files/4575877) | ||
- [No Fade](https://www.curseforge.com/minecraft/mc-mods/no-fade/files/3550935) | ||
- [CIT Resewn](https://modrinth.com/mod/otVJckYQ/version/c7Lo4vij) | ||
- [Falling Leaves](https://modrinth.com/mod/WhbRG4iK/version/HMfGMPn2) | ||
- [Hold That Chunk](https://modrinth.com/mod/LXJlc5WJ/version/TbJQtyy8) | ||
- [Sodium](https://modrinth.com/mod/AANobbMI/version/vgceLbdH) | ||
- [Model Gap Fix](https://www.curseforge.com/minecraft/mc-mods/model-gap-fix/files/4358013) | ||
- [Puzzle](https://modrinth.com/mod/3IuO68q1/version/SyDRZGtj) | ||
- [BetterF3](https://modrinth.com/mod/8shC1gFX/version/FtJ0KSLo) | ||
- [Debugify](https://modrinth.com/mod/QwxR6Gcd/version/6XDJoCks) | ||
- [Starlight (Fabric)](https://modrinth.com/mod/H8CaAYZC/version/XGIsoVGT) | ||
- [Your Options Shall Be Respected (YOSBR)](https://www.curseforge.com/minecraft/mc-mods/yosbr/files/4581910) | ||
- [Better Mount HUD](https://modrinth.com/mod/kqJFAPU9/version/h1QpxElt) | ||
- [Jade 🔍](https://modrinth.com/mod/nvQzSEkH/version/lcQiLHVM) | ||
- [Fast Better Grass](https://www.curseforge.com/minecraft/texture-packs/fast-better-grass/files/4531677) | ||
- [Not Enough Animations](https://modrinth.com/mod/MPCX6s5C/version/6auoqhMp) | ||
- [AdvancementInfo](https://modrinth.com/mod/G1epq3jN/version/KeVl7NVo) | ||
- [Animatica](https://www.curseforge.com/minecraft/mc-mods/animatica/files/4600415) | ||
- [FerriteCore (Fabric)](https://www.curseforge.com/minecraft/mc-mods/ferritecore-fabric/files/4574364) | ||
- [MoreChatHistory](https://modrinth.com/mod/8qkXwOnk/version/b1apT2G2) | ||
- [Borderless Mining](https://modrinth.com/mod/kYq5qkSL/version/n8nRcdvu) | ||
- [FabricSkyboxes](https://modrinth.com/mod/YBz7DOs8/version/bl8ZIucH) | ||
- [Entity View Distance](https://modrinth.com/mod/ihnBJ6on/version/piYJfUyC) | ||
- [ImmediatelyFast](https://modrinth.com/mod/5ZwdcRci/version/4IDo27OL) | ||
- [Memory Leak Fix](https://modrinth.com/mod/NRjRiSSD/version/kLyFtyv2) | ||
- [MixinTrace](https://modrinth.com/mod/sGmHWmeL/version/LGYOH4RN) | ||
- [Model Gap Fix](https://modrinth.com/mod/QdG47OkI/version/i0mERlxq) | ||
- [Continuity](https://modrinth.com/mod/1IjD5062/version/ImUFj5Gl) | ||
- [DashLoader](https://modrinth.com/mod/ZfQ3kTvR/version/mcU33FBx) | ||
- [Reese's Sodium Options](https://modrinth.com/mod/Bh37bMuy/version/SgSIhHQO) | ||
- [Debugify](https://modrinth.com/mod/QwxR6Gcd/version/7SaNcvDx) | ||
- [Fabric Language Kotlin](https://modrinth.com/mod/Ha28R6CL/version/ADg3gvlr) | ||
- [Falling Leaves (Fabric)](https://www.curseforge.com/minecraft/mc-mods/falling-leaves-fabric/files/4591160) | ||
- [Dynamic FPS](https://modrinth.com/mod/LQ3K71Q1/version/Usg995P0) | ||
- [Architectury API](https://modrinth.com/mod/lhGA9TYQ/version/TWylwR7P) | ||
- [Eating Animation [Fabric]](https://www.curseforge.com/minecraft/mc-mods/eating-animation-fabric/files/4573352) | ||
- [Iris Shaders](https://modrinth.com/mod/YL57xq9U/version/URWeWMAt) | ||
- [Litematica](https://www.curseforge.com/minecraft/mc-mods/litematica/files/4593296) | ||
- [Roughly Enough Professions (REP)](https://modrinth.com/mod/V8XJ8f5f/version/z68Dk1tK) | ||
- [AntiGhost](https://modrinth.com/mod/Jw3Wx1KR/version/Jq5eCzIr) | ||
- [EntityCulling](https://modrinth.com/mod/NNAgCjsB/version/d20sUcYn) | ||
- [More Chat History](https://www.curseforge.com/minecraft/mc-mods/more-chat-history/files/3902698) | ||
- [Slyde](https://modrinth.com/mod/diCZrsch/version/Is3egzJZ) | ||
- [Even Better Enchants](https://modrinth.com/mod/6udpuGCH/version/Hk6zJ311) | ||
- [Lithium](https://modrinth.com/mod/gvQqBUqZ/version/2KMrj5c1) | ||
- [More Culling](https://modrinth.com/mod/51shyZVL/version/BbgZWSfa) | ||
- [Full Brightness Toggle](https://modrinth.com/mod/aEK1KhsC/version/1pNrgc4v) | ||
- [BetterF3](https://modrinth.com/mod/8shC1gFX/version/NwdpRyuN) | ||
- [No Chat Reports](https://modrinth.com/mod/qQyHxfxd/version/TbKB6mYU) | ||
- [OptiGUI](https://modrinth.com/mod/JuksLGBQ/version/YU9Yi2mO) | ||
- [Cull Leaves](https://modrinth.com/mod/GNxdLCoP/version/jAdt9S90) | ||
- [FPS - Display](https://modrinth.com/mod/DIlqwRFH/version/VFkr4zMC) | ||
- [Blur (Fabric)](https://modrinth.com/mod/NK39zBp2/version/dki8Ab2D) | ||
- [Cloth Config API](https://modrinth.com/mod/9s6osm5g/version/y0kQixP8) | ||
- [Fabrishot](https://modrinth.com/mod/3qsfQtE9/version/IkbywOGy) | ||
- [Held Item Info](https://modrinth.com/mod/tEcWzCZz/version/Rir70mD8) | ||
- [Language Reload](https://modrinth.com/mod/uLbm7CG6/version/lFKmtdMw) | ||
- [MaLiLib](https://www.curseforge.com/minecraft/mc-mods/malilib/files/4593073) | ||
- [Sound Physics Remastered](https://modrinth.com/mod/qyVF9oeo/version/jFi9wAm9) | ||
- [SuperMartijn642's Config Lib](https://modrinth.com/mod/LN9BxssP/version/AnZ97CRs) | ||
- [Xaero's Minimap](https://www.curseforge.com/minecraft/mc-mods/xaeros-minimap/files/4593190) | ||
- [Mouse Wheelie](https://modrinth.com/mod/u5Ic2U1u/version/cu12faXh) | ||
- [Roughly Enough Items (REI)](https://modrinth.com/mod/nfn13YXA/version/DcqGHHWy) | ||
- [FabricSkyBoxes Interop](https://www.curseforge.com/minecraft/mc-mods/fabricskyboxes-interop/files/4585576) | ||
- [Collective](https://www.curseforge.com/minecraft/mc-mods/collective/files/4601906) | ||
- [Visuality](https://modrinth.com/mod/rI0hvYcd/version/BipSJ05N) | ||
- [Chat Reporting Helper](https://www.curseforge.com/minecraft/texture-packs/chat-reporting-helper/files/4597069) | ||
- [YetAnotherConfigLib](https://modrinth.com/mod/1eAoo2KR/version/ZqWkEgYo) | ||
- [e4mc](https://modrinth.com/mod/qANg5Jrr/version/jWzkvN1j) | ||
- [Default Dark Mode](https://modrinth.com/mod/6SLU7tS5/version/eRm0esFJ) | ||
- [Roughly Enough Items (REI)](https://modrinth.com/mod/nfn13YXA/version/kq4TOe4i) | ||
- [Sodium Extra](https://modrinth.com/mod/PtjYWJkn/version/80a0J5Cn) | ||
- [Presence Footsteps](https://modrinth.com/mod/rcTfTZr3/version/pOCYcZUF) | ||
- [YetAnotherConfigLib](https://modrinth.com/mod/1eAoo2KR/version/3hsIB5yP) | ||
- [Even Better Enchants](https://modrinth.com/mod/6udpuGCH/version/Hk6zJ311) | ||
- [Main Menu Credits](https://modrinth.com/mod/qJDfP7WN/version/hWX5REu6) | ||
- [Collective](https://modrinth.com/mod/e0M1UDsY/version/TobnIU5c) | ||
- [Language Reload](https://modrinth.com/mod/uLbm7CG6/version/Oyc76oFa) | ||
- [Your Options Shall Be Respected (YOSBR)](https://modrinth.com/mod/WwbubTsV/version/KMOzdYko) | ||
- [FabricSkyboxes](https://modrinth.com/mod/YBz7DOs8/version/cezLH6eB) | ||
- [Indium](https://modrinth.com/mod/Orvt0mRa/version/Lue6O9z9) | ||
- [lazy-language-loader](https://modrinth.com/mod/Nz0RSWrF/version/VkswlqCU) | ||
- [Model Gap Fix](https://modrinth.com/mod/QdG47OkI/version/r6uVoUxU) | ||
- [No Chat Reports](https://modrinth.com/mod/qQyHxfxd/version/HeZZR2kF) | ||
- [MixinTrace](https://modrinth.com/mod/sGmHWmeL/version/LGYOH4RN) | ||
- [Memory Leak Fix](https://modrinth.com/mod/NRjRiSSD/version/dGlflhb6) | ||
- [LiLaC](https://modrinth.com/mod/Rtp2Lyr5/version/UuwX5TxU) | ||
- [More Culling](https://modrinth.com/mod/51shyZVL/version/Bu5pCvCn) | ||
- [Fabrishot](https://modrinth.com/mod/3qsfQtE9/version/fLwacDtJ) | ||
- [Fadeless](https://modrinth.com/mod/ncKjyGm3/version/j53ChsnW) | ||
- [Falling Leaves](https://modrinth.com/mod/WhbRG4iK/version/KpvXCE2X) | ||
- [Full Brightness Toggle](https://modrinth.com/mod/aEK1KhsC/version/9MUSHIIy) | ||
- [MoreChatHistory](https://modrinth.com/mod/8qkXwOnk/version/b1apT2G2) | ||
- [Chat Reporting Helper](https://www.curseforge.com/minecraft/texture-packs/chat-reporting-helper/files/4753776) | ||
- [Continuity](https://modrinth.com/mod/1IjD5062/version/Z9FJWLMt) | ||
- [Litematica](https://www.curseforge.com/minecraft/mc-mods/litematica/files/4626718) | ||
- [Wakes](https://modrinth.com/mod/dlNu0RQY/version/NCJ1TwEm) | ||
- [Dynamic FPS](https://modrinth.com/mod/LQ3K71Q1/version/MJxmQ042) | ||
- [Fabric Language Kotlin](https://modrinth.com/mod/Ha28R6CL/version/atZwzPrT) | ||
- [LambdaBetterGrass](https://modrinth.com/mod/2Uev7LdA/version/Fhyj2P7Q) | ||
- [Architectury API](https://modrinth.com/mod/lhGA9TYQ/version/Sbew3kXe) | ||
- [AppleSkin](https://modrinth.com/mod/EsAfCjCV/version/xcauwnEB) | ||
- [Visuality](https://modrinth.com/mod/rI0hvYcd/version/uhvQD6Ny) | ||
- [Default Dark Mode](https://modrinth.com/mod/6SLU7tS5/version/SEAHWiIS) | ||
- [ShulkerBoxTooltip](https://modrinth.com/mod/2M01OLQq/version/gVxjsEiQ) | ||
- [Boat Item View](https://modrinth.com/mod/BdKIyOLe/version/Q3Z6GESL) | ||
- [Eating Animation [Fabric]](https://modrinth.com/mod/rUgZvGzi/version/OcHlWpeQ) | ||
- [FastQuit](https://modrinth.com/mod/x1hIzbuY/version/E1amq7WP) | ||
- [Mod Menu](https://modrinth.com/mod/mOgUt4GM/version/RTFDnTKf) | ||
- [Roughly Searchable](https://modrinth.com/mod/njGhQ4fN/version/jgVJ81P0) | ||
- [Simple Voice Chat](https://modrinth.com/mod/9eGKb6K1/version/rrp71BLc) | ||
- [Zoomify](https://modrinth.com/mod/w7ThoJFB/version/1mKrqlvv) | ||
- [AppleSkin](https://modrinth.com/mod/EsAfCjCV/version/CxnVG86Y) | ||
- [Fabric API](https://modrinth.com/mod/P7dR8mSH/version/n2c5lxAo) | ||
- [Presence Footsteps](https://modrinth.com/mod/rcTfTZr3/version/FMF3yzCR) | ||
- [Sodium Extra](https://modrinth.com/mod/PtjYWJkn/version/kTxAMqAj) | ||
- [Wavey Capes](https://modrinth.com/mod/kYuIpRLv/version/9ppedk6Z) | ||
- [Entity View Distance](https://modrinth.com/mod/ihnBJ6on/version/piYJfUyC) | ||
- [FabricSkyBoxes Interop](https://modrinth.com/mod/HpdHOPOp/version/mH6v5ahJ) | ||
- [Chat Heads](https://modrinth.com/mod/Wb5oqrBJ/version/gzgdiHby) | ||
- [Mod Menu](https://modrinth.com/mod/mOgUt4GM/version/lEkperf6) | ||
- [Borderless Mining](https://modrinth.com/mod/kYq5qkSL/version/lhrW53q7) | ||
- [Capes](https://modrinth.com/mod/89Wsn8GD/version/z2zOEvPP) | ||
- [Xaero's World Map](https://www.curseforge.com/minecraft/mc-mods/xaeros-world-map/files/4594991) | ||
- [Durability Tooltip](https://modrinth.com/mod/smUP7V3r/version/oTdPPG3r) | ||
- [Entity Model Features [CEM]](https://modrinth.com/mod/4I1XuqiY/version/nqu0vi2x) | ||
- [Entity Texture Features - [Fabric & Forge]](https://www.curseforge.com/minecraft/mc-mods/entity-texture-features-fabric/files/4575726) | ||
- [LibJF](https://modrinth.com/mod/WKwQAwke/version/ARDN1LWN) | ||
- [e4mc](https://modrinth.com/mod/qANg5Jrr/version/vVFlVRt7) | ||
- [SuperMartijn642's Config Lib](https://modrinth.com/mod/LN9BxssP/version/Ur02nrUT) | ||
- [LambDynamicLights](https://modrinth.com/mod/yBW8D80W/version/mYl4RvKg) | ||
- [Slyde](https://modrinth.com/mod/diCZrsch/version/OmddWiRu) | ||
- [Wavey Capes](https://modrinth.com/mod/kYuIpRLv/version/9ppedk6Z) | ||
- [Better Mount HUD](https://modrinth.com/mod/kqJFAPU9/version/h1QpxElt) | ||
- [Xaero's Minimap](https://modrinth.com/mod/1bokaNcj/version/3l0ZI6yD) | ||
- [Reese's Sodium Options](https://modrinth.com/mod/Bh37bMuy/version/hCsMUZLa) | ||
- [Drip Sounds (Fabric)](https://modrinth.com/mod/T8MMXTpr/version/7GB1hLrr) | ||
- [ImmediatelyFast](https://modrinth.com/mod/5ZwdcRci/version/mbeaDZtb) | ||
- [EntityCulling](https://modrinth.com/mod/NNAgCjsB/version/BDwHAdWc) | ||
- [CIT Resewn](https://modrinth.com/mod/otVJckYQ/version/c7Lo4vij) | ||
- [Cloth Config API](https://modrinth.com/mod/9s6osm5g/version/s7VTKfLA) | ||
- [DashLoader](https://modrinth.com/mod/ZfQ3kTvR/version/wgtrj8HS) | ||
- [Entity Model Features [CEM]](https://modrinth.com/mod/4I1XuqiY/version/zO7oFMiv) | ||
- [FPS - Display](https://modrinth.com/mod/DIlqwRFH/version/WaO5IB1q) | ||
- [Hold That Chunk](https://modrinth.com/mod/LXJlc5WJ/version/TbJQtyy8) | ||
- [Durability Tooltip](https://modrinth.com/mod/smUP7V3r/version/WmJeyttw) | ||
- [Blur (Fabric)](https://modrinth.com/mod/NK39zBp2/version/dki8Ab2D) | ||
- [OptiGUI](https://modrinth.com/mod/JuksLGBQ/version/rBFq3aQs) | ||
- [AntiGhost](https://modrinth.com/mod/Jw3Wx1KR/version/RzyN0vkk) | ||
- [FastQuit](https://modrinth.com/mod/x1hIzbuY/version/tNgyOUMr) | ||
- [Roughly Enough Professions (REP)](https://modrinth.com/mod/V8XJ8f5f/version/ybcBEXlZ) | ||
- [FerriteCore](https://modrinth.com/mod/uXXizFIs/version/unerR5MN) | ||
- [Xaero's World Map](https://modrinth.com/mod/NcUtCpym/version/s974wWCK) | ||
- [AdvancementInfo](https://modrinth.com/mod/G1epq3jN/version/gfcbMV82) | ||
- [Animatica](https://modrinth.com/mod/PRN43VSY/version/uNgEPb10) | ||
- [Jade 🔍](https://modrinth.com/mod/nvQzSEkH/version/ckXpheui) | ||
- [Eating Animation](https://modrinth.com/mod/rUgZvGzi/version/RG3MoH9k) | ||
- [MaLiLib](https://www.curseforge.com/minecraft/mc-mods/malilib/files/4623483) | ||
- [Sodium](https://modrinth.com/mod/AANobbMI/version/4OZL6q9h) | ||
- [Cull Leaves](https://modrinth.com/mod/GNxdLCoP/version/vGCKmen2) | ||
- [MidnightLib](https://modrinth.com/mod/codAaoxh/version/3YykTkmJ) | ||
- [Not Enough Animations](https://modrinth.com/mod/MPCX6s5C/version/6auoqhMp) | ||
- [Mouse Wheelie](https://modrinth.com/mod/u5Ic2U1u/version/wPtDzPBH) | ||
- [Sound Physics Remastered](https://modrinth.com/mod/qyVF9oeo/version/67Uq017p) | ||
- [Simple Voice Chat](https://modrinth.com/mod/9eGKb6K1/version/SDtXZKUE) | ||
- [Quilted Fabric API (QFAPI) / Quilt Standard Libraries (QSL)](https://modrinth.com/mod/qvIfYCYJ/version/GjvWb8WQ) | ||
- [Stack to Nearby Chests](https://modrinth.com/mod/HtGckJVc/version/s9xjTXQ7) | ||
- [Iris Shaders](https://modrinth.com/mod/YL57xq9U/version/DsjYuGMO) | ||
- [Puzzle](https://modrinth.com/mod/3IuO68q1/version/F5UKlslF) | ||
- [Zoomify](https://modrinth.com/mod/w7ThoJFB/version/gZr7EykF) | ||
- [Fast Better Grass](https://www.curseforge.com/minecraft/texture-packs/fast-better-grass/files/4753819) | ||
- [[ETF] Entity Texture Features](https://modrinth.com/mod/BVzZfTc1/version/Z9uVc7X6) | ||
- [Quilt Kotlin Libraries (QKL)](https://modrinth.com/mod/lwVhp9o5/version/RYTef2Wb) | ||
- [Roughly Searchable](https://modrinth.com/mod/njGhQ4fN/version/NrzGdIx2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[server] | ||
enabled = false | ||
enabled = true | ||
|
||
folders = [ | ||
"mods", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
package cmd | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
"os" | ||
"os/exec" | ||
"path" | ||
"strings" | ||
|
||
"github.com/NoSadBeHappy/SodiumPlus/builder/internal/helpers" | ||
"github.com/google/go-github/v56/github" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var ( | ||
JavaPath string | ||
PackPath string | ||
) | ||
|
||
var InstallCommand = CreateInstallCommand() | ||
|
||
func CreateInstallCommand() *cobra.Command { | ||
cmd := cobra.Command{ | ||
Use: "install", | ||
Aliases: []string{"i"}, | ||
Short: "Install the modpack (development version).", | ||
Long: `Install the modpack (development version).`, | ||
SilenceUsage: true, | ||
Args: cobra.MinimumNArgs(1), | ||
|
||
RunE: func(cmd *cobra.Command, args []string) error { | ||
installerPath := path.Join(os.TempDir(), "packwiz-installer-bootstrap.jar") | ||
client := github.NewClient(nil) | ||
|
||
err := helpers.Refresh() | ||
|
||
if err != nil { | ||
return err | ||
} | ||
|
||
fmt.Println("Downloading bootstrapper...") | ||
|
||
rel, _, err := client.Repositories.GetLatestRelease(context.Background(), "packwiz", "packwiz-installer-bootstrap") | ||
|
||
if err != nil { | ||
return err | ||
} | ||
|
||
for _, asset := range rel.Assets { | ||
name := *asset.Name | ||
|
||
if strings.HasSuffix(name, ".jar") { | ||
url := *asset.BrowserDownloadURL | ||
|
||
err = helpers.DownloadFile(installerPath, url) | ||
|
||
if err != nil { | ||
return err | ||
} | ||
|
||
break | ||
} | ||
} | ||
|
||
fmt.Println("Creating install directory...") | ||
|
||
os.MkdirAll(strings.Join(args, " "), os.ModePerm) | ||
|
||
defer os.Remove(installerPath) | ||
|
||
fmt.Println("Running installer...") | ||
|
||
cexec := exec.Command(JavaPath, "-jar", installerPath, "-g", PackPath) | ||
|
||
cexec.Dir = strings.Join(args, " ") | ||
cexec.Stdout = os.Stdout | ||
cexec.Stderr = os.Stderr | ||
|
||
err = cexec.Start() | ||
|
||
if err != nil { | ||
return err | ||
} | ||
|
||
return cexec.Wait() | ||
}, | ||
} | ||
|
||
cwd, err := os.Getwd() | ||
|
||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
cmd.Flags().StringVarP(&JavaPath, "java", "j", "java", "The path to the Java executable") | ||
cmd.Flags().StringVarP(&PackPath, "file", "f", cwd+"/pack.toml", "The path to the pack.toml file") | ||
|
||
return &cmd | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package helpers | ||
|
||
import ( | ||
"fmt" | ||
"io" | ||
"net/http" | ||
"os" | ||
) | ||
|
||
func DownloadFile(filepath string, url string) (err error) { | ||
out, err := os.Create(filepath) | ||
|
||
if err != nil { | ||
return err | ||
} | ||
|
||
defer out.Close() | ||
|
||
resp, err := http.Get(url) | ||
|
||
if err != nil { | ||
return err | ||
} | ||
|
||
defer resp.Body.Close() | ||
|
||
if resp.StatusCode != http.StatusOK { | ||
return fmt.Errorf("bad status code: %s", resp.Status) | ||
} | ||
|
||
_, err = io.Copy(out, resp.Body) | ||
|
||
if err != nil { | ||
return err | ||
} | ||
|
||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.