Closed DemonixCraft closed 6 years ago
Hm... I can't make it work. I just checked it and git clone https://github.com/imachug/win-sudo.git/s
line doesn't work.
So, what about that git clone https://github.com/imachug/win-sudo.git/s ~/bin/win-sudo
line that doesn't work?
You need to create the 's' folder and add all the 'sudo' .txt files to it. To do so you have to copy the code from each of them and create a new file with the same name and paste the code there, and then delete the files in the main directory.
Try downloading my install.sh file from my fork using : 'curl -s https://raw.githubusercontent.com/DemonixCraft/win-sudo/master/install.sh | sh'
Check my fork at DemonixCraft/win-sudo for reference
I am getting fatal: repository 'https://github.com/DemonixCraft/win-sudo.git/s/' not found
when I replace imachug
with DemonixCraft
everywhere.
Can you screenshot your git window with the code output?
I just changed my install.sh to grab from DemonixCraft's repo for the moment
Should work for my fork and if not the link to my repo folder might have to be altered
https://github.com/DemonixCraft/win-sudo/s
is a proper link, right?
#!/usr/bin/env bash
function doInstall {
if ! [ -L ~/bin/win-sudo ] && ! [ -d ~/bin/win-sudo ]; then
echo make dir
mkdir ~/bin/win-sudo
fi
git clone https://github.com/DemonixCraft/win-sudo.git/s ~/bin/win-sudo
}
function doFail {
echo "failed to install, sorry :'(";
exit 1
}
doInstall || doFail
PATH=$PATH:/c/Users/*/win-sudo
echo "enjoy :)"
Sorry, I meant when you entered the 'git clone' command into your Git Bash window, you should take a screenshot of the error message. Sorry again for the misunderstanding.
C:\Users\Ivanq\Documents>git clone https://github.com/DemonixCraft/win-sudo.git/s ~/bin/win-sudo
Cloning into '~/bin/win-sudo'...
remote: Not Found
fatal: repository 'https://github.com/DemonixCraft/win-sudo.git/s/' not found
By the way, what is your Git version?
I'm pretty sure it's the latest version
maybe there has to be a '/' after the 's'?
I'll take a look into revisions and do some more testing. Keep this pull open until I can figure out the issue, if that's okay with you.
Can you please make a screenshot of your result?
I'm actually not at my own computer right now, I'll try it on my Git in about an hour.
Okay, I'll keep this PR open then.
Okay so I did some more testing and every line of code except for 'git clone' works perfectly fine. Apparently, git can only grab the entire directory with git clone, but somehow I'm managing to work around the problem. It's an unfinished one-liner that will perform the following :
Also I got the same output you did.
Okay I got the 'git clone' command to work but it's two lines and I'm still revising PATH
Maybe you should try so-called sparse checkout?
I've been looking at that but idk how it works. It seems like a solution though so I'll look into it.
When you manage to get it working, please tell me.
I revised my previous code with various installs and I came up with a solution. Instead of installing the entire project, moving the 'sudo' files one by one to ~/bin, and then deleting the project, now all we have to do is grab all the files from the new 's' folder and clone them into ~/bin. I also added a new 'PATH' code line using the wildcard feature :
PATH=$PATH:/c/Users/*/win-sudo
The '*' in this line represents any folder in 'Users' with 'win-sudo' inside of it, which should be just installed. And the best part is, it can be run directly from script, meaning only 1 line of code is needed to install and setup win-sudo. For the install I excluded the .md and .gif files because they weren't necessary for installation, and also install.sh because that was already installed using the cloning command. I named the folder 's' for two reasons : 1. It is the first letter of every file that needs to be moved to ~/bin 2. It's name is unique from every file in the folder so it won't be confusingImportant Note : I have tried this .sh file when installing win-sudo and the 'git clone' command is proper syntax. It should work fine as long as there is connection to the network. The new PATH command I added also works on my machine.
Extra Changes :
Please take a look at this and any feedback would be appreciated.