Scoop
Scoop copied to clipboard
[Feature] Make a small Git fork exclusively for cloning
Feature Request
Is your feature request related to a problem? Please describe.
I often rev up a VM to test my apps and if they install correctly, one annoyance is that Git takes a bit to install each time (40+MB), and takes almost 300MB in apps
Describe the solution you'd like
Why not make a trimmed down version which can only clone repos. It could also be integrated it into Scoop, if it has advanced integration it could be automatically installed when the user specifies a non-added known bucket, example:
PS C:\> iex(irm get.scoop.sh)
Initializing...
Downloading scoop...
Extracting...
Creating shim...
Downloading main bucket...
Extracting...
Adding ~\scoop\shims to your path
Scoop was installed successfully!
Type 'scoop help' for instructions
PS C:\> scoop install extras/librewolf
Adding the 'extras' bucket.. # Detects non installed bucket is in known
Installing '7zip' (21.07) [64bit]
7z2107-x64.msi (1.8 MB) [======================================================] 100%
Checking hash of 7z2107-x64.msi ... ok.
Extracting 7z2107-x64.msi ... done.
Running pre-install script...
Linking ~\scoop\apps\7zip\current => ~\scoop\apps\7zip\21.07
Creating shim for '7z'.
Creating shortcut for 7-Zip (7zFM.exe)
Persisting Codecs
Persisting Formats
'7zip' (21.07) was installed successfully!
Git not found, installing Cloner... # Failed to find git
Installing 'Cloner' (1.0) [64bit]
cloner-x64.7z (2.3 MB) [=======================================================] 100%
Creating shim for 'cloner'
Checking repo... ok # Runs scoop bucket add extras
The extras bucket was added successfully.
Installing 'librewolf' (97.0.1) [64bit]
librewolf-97.0.1.en-US.win64.zip (73.9 MB) [====================================] 100%
Checking hash of librewolf-97.0.1.en-US.win64.zip ... ok.
Extracting librewolf-97.0.1.en-US.win64.zip ... done.
Running pre-install script...
Linking ~\scoop\apps\librewolf\current => ~\scoop\apps\librewolf\97.0.1
Creating shim for 'librewolf'.
Creating shortcut for Librewolf (librewolf-portable.exe)
Persisting Profiles
'librewolf' (97.0.1) was installed successfully!
How I could imagine it to work in the background:
if ($app -like "*/*"){
$bucket = $app.split('/')[0]
if (($bucket -notin $installedbuckets) -and ($bucket -in (scoop bucket known))){
if (-Not(Get-Command git -ErrorAction Ignore)){
scoop install main/cloner
}
# Add the bucket
}
# Install an app
}
Or while scoop is installing also install it if git
is not found in path
Describe alternatives you've considered
- Script that moves everything to Scoop's
cache
folder so I don't have to download anything - Doing
scoop install <raw manifest url/manifestpath>
(only in temporary environments, iirc this breaks updates)
This feature tends to be accomplished in recent Scoop Core release (using semiver and a tarball program), thank you for your advice and potential sketch.
Actually, such a tool already exists - https://github.com/ScoopInstaller/GitCloner
But yes it is not integrated into the scoop bucket add
functionality.
But my question is, why not use this scoop install <raw manifest url/manifestpath>
? If you are testing a manifest in a VM, you won't need to update buckets (which requires git), right?
Another idea is to use docker: https://github.com/ScoopInstaller/Scoop/issues/2783
Actually, such a tool already exists - https://github.com/ScoopInstaller/GitCloner
But yes it is not integrated into the
scoop bucket add
functionality.But my question is, why not use this
scoop install <raw manifest url/manifestpath>
? If you are testing a manifest in a VM, you won't need to update buckets (which requires git), right?
Yup, I just got the idea this way to make installing Scoop and other buckets much faster in general
Also for GitCloner that's exactly what I mean, I'd love seeing this being integrated into Scoop
You can also change your git command to be more minimal.
https://stackoverflow.com/questions/25954622/a-way-to-keep-a-shallow-git-clone-just-minimally-up-to-date
I think that similar issue (and solution) had been raised in #4044. Maybe the functions shallow-clone, shallow-fetch and make-shallow can be added to the code and take some of the place of git_cmd, or perhaps one can just add "--depth=1" in each case.
Filing this under #4881