Comments (18)
Because for enabling upgrade-self
subcommand.
from apt-cyg.
Why you want to make a repository on /usr/local/bin
?
I repeat to say that following commands do not make a script /usr/local/bin/apt-cyg
but a directory.
cd /usr/local/bin &&
git clone https://github.com/kou1okada/apt-cyg.git
The script file is /usr/local/bin/apt-cyg/apt-cyg
.
And your PATH have not /usr/local/bin/apt-cyg
but /usr/local/bin
.
from apt-cyg.
How about my home directory, is that supported?
Of course, Yes.
You can install apt-cyg
anywhere you want.
I tried doing this, with a symlink to /usr/local/bin as the documentation suggests, but for some reason everytime I run apt-cyg it creates a separate apt-cyg and installation folder on my desktop instead of inside my home directory.
Perhaps, you downloaded `setup-x86_64.exe' to the DESKTOP and then executed it on the DESKTOP and installed cygwin.
Please check the location of the cache directory with following command:
apt-cyg pathof cache
Probably it will be "/cygdrive/c/Users/${USER}/Desktop" on your environment.
apt-cyg set-cache <directory>
sub-command helps you to change it another location.
I'm using the default Downloads folder of Windows.
You can use it with following:
apt-cyg set-cache "$USERPROFILE/Downloads/cygwin"
from apt-cyg.
If you do following:
cd /usr/local/bin &&
git clone https://github.com/kou1okada/apt-cyg.git
It clones https://github.com/kou1okada/apt-cyg.git
to /usr/local/bin/apt-cyg/
.
So you can't create symbolic link /usr/local/bin/apt-cyg
, it is already directory.
And following is wrong too:
ln -s "$(realpath apt-cyg)" /usr/local/bin/
In this case, your working directory is /usr/local/bin
.
Thus, the result of $(realpath apt-cyg)
is /usr/local/bin/apt-cyg
.
So ln
try to make symbolic link for /usr/local/bin/apt-cyg
-> /usr/local/bin/apt-cyg
.
It seems like Ouroboros.
from apt-cyg.
Directories, which I recommend for the base of git clone
, are /usr/local
, /usr/local/src
, /usr/local/src/github.com/kou1okada
, /opt
, /opt/github.com/kou1okada
, etc,,,.
Maybe /usr/local/src/github.com/kou1okada
is the best in this case.
Try this one:
DIR=/usr/local/src/github.com/kou1okada
mkdir -p "$DIR"
cd "$DIR"
git clone https://github.com/kou1okada/apt-cyg.git
ln -s "$(realpath apt-cyg/apt-cyg)" /usr/local/bin/
Note that if you already have /usr/local/bin/apt-cyg
, don't forget to remove it before running above commands.
rm -rvfi /usr/local/bin/apt-cyg
from apt-cyg.
If you do following:
cd /usr/local/bin &&
git clone https://github.com/kou1okada/apt-cyg.gitIt clones https://github.com/kou1okada/apt-cyg.git to /usr/local/bin/apt-cyg/.
So you can't create symbolic link /usr/local/bin/apt-cyg, it is already directory.And following is wrong too:
ln -s "$(realpath apt-cyg)" /usr/local/bin/
In this case, your working directory is /usr/local/bin.
Thus, the result of $(realpath apt-cyg) is /usr/local/bin/apt-cyg.
So ln try to make symbolic link for /usr/local/bin/apt-cyg -> /usr/local/bin/apt-cyg.
It seems like Ouroboros.
I understand that, but this should mean that because apt-cyg is in /usr/local/bin already, I don't need to make a symbolic link anyway, and apt-cyg should work, right? But as I mentioned in my OP, running apt-cyg
still doesn't work even when it is in /usr/local/bin, and /usr/local/bin is in the PATH.
from apt-cyg.
Directories, which I recommend for the base of
git clone
, are/usr/local
,/usr/local/src
,/usr/local/src/github.com/kou1okada
,/opt
,/opt/github.com/kou1okada
, etc,,,.Maybe
/usr/local/src/github.com/kou1okada
is the best in this case.Try this one:
DIR=/usr/local/src/github.com/kou1okada mkdir -p "$DIR" cd "$DIR" git clone https://github.com/kou1okada/apt-cyg.git ln -s "$(realpath apt-cyg/apt-cyg)" /usr/local/bin/
Note that if you already have
/usr/local/bin/apt-cyg
, don't forget to remove it before running above commands.rm -rvfi /usr/local/bin/apt-cyg
So are you saying that it's impossible to make apt-cyg
work in usr/local/bin
?
from apt-cyg.
Why you want to make a repository on
/usr/local/bin
?
I repeat to say that following commands do not make a script/usr/local/bin/apt-cyg
but a directory.cd /usr/local/bin && git clone https://github.com/kou1okada/apt-cyg.git
The script file is
/usr/local/bin/apt-cyg/apt-cyg
.
And your PATH have not/usr/local/bin/apt-cyg
but/usr/local/bin
.
Okay, I understand what you're saying now. How about this:
cd /usr/local/src
git clone https://github.com/kou1okada/apt-cyg.git &&
ln -s "$(realpath apt-cyg/apt-cyg)" /usr/local/bin/
from apt-cyg.
It's O.K.
But you should consider the case that your environment never have /usr/local/src
yet.
I recommend do mkdir -p /usr/local/src
before you do it.
from apt-cyg.
No.
ln -s "$(realpath ./apt-cyg)" /usr/local/bin/
The result of
$(realpath ./apt-cyg)
is/usr/local/src/apt-cyg
.
It's directory.
The script, that you want to run, is/usr/local/src/apt-cyg/apt-cyg
.The sequence of commands that you really wanted to do is following:
DIR=/usr/local/src mkdir -p "$DIR" cd "$DIR" git clone https://github.com/kou1okada/apt-cyg.git ln -s "$(realpath apt-cyg/apt-cyg)" /usr/local/bin/
My bad, the part that you saw/quoted was an old edit that I copied without udpating. I've edited it now, and that's what I was referring to.
from apt-cyg.
It's O.K.
But you should consider the case that your environment never have/usr/local/src
yet.
I recommend domkdir -p /usr/local/src
before you do it.
Yeah, Cygwin doesn't come with /usr/local/src
by default, it was the plan to make the directory first, I just wanted to make sure the rest of the commands were good. Thanks for your patient help once again.
from apt-cyg.
Hmm,,,
Edit
makes confusing.
from apt-cyg.
If someone, who are reading this issue, is confused, please refer edited
log too.
from apt-cyg.
Why not just download it directly? As an admin console, run the following:
curl -fsSL https://raw.githubusercontent.com/kou1okada/apt-cyg/master/apt-cyg -o /usr/local/bin/apt-cyg
chmod +x /usr/local/bin/apt-cyg
from apt-cyg.
Coming back to this, I solved it by doing:
cd /usr/local/bin
https://github.com/kou1okada/apt-cyg.git
...and then adding:
export PATH="$PATH:/usr/local/bin/apt-cyg"
to my ~/.bash_profile
.
This gives me the best of both worlds: put apt-cyg
under revision control to enable upgrade-self
, while installing it directly into the /usr/local/bin
folder without needing to have it stored anywhere else and mess around with symbolic links.
from apt-cyg.
I repeat, my recommendation is #45 (comment).
To make repository under /usr/local/bin
is not standard, maybe.
Perhaps, the bast place to make a repository is under the /opt
or /usr/local/src
, I think.
Filesystem Hierarchy Standard on Wikipedia may help understanding it.
from apt-cyg.
Fair enough, but I'm trying to store apt-cyg somewhere where it's more easily accessible. How about my home directory, is that supported? I tried doing this, with a symlink to /usr/local/bin
as the documentation suggests, but for some reason everytime I run apt-cyg it creates a separate apt-cyg
and installation folder on my desktop instead of inside my home directory. I don't remember this behaviour occurring before, and I'd like to keep my desktop clear while keeping all of the apt-cyg stuff together in the home folder.
from apt-cyg.
That worked perfectly, thank you.
from apt-cyg.
Related Issues (20)
- Feature request: autoremove HOT 1
- Suggest to install libiconv too. HOT 2
- Cygwin public key hardcoded in apt-cyg expired HOT 1
- cygwin.com package for apt-cyg HOT 4
- Support `provides:` parameter in `setup.ini`. HOT 1
- Support for specifying a specific version in the install command.
- All commands open "Error opening Help in Windows-based programs" page. HOT 1
- Set default installation path to /usr/bin or /usr/local/bin path HOT 1
- homepage: command not found HOT 1
- Bad GPG signature warnings again HOT 2
- Very Hard to Install and not working, getting error HOT 3
- Output capping [enhancement] HOT 1
- Installing specific version of the HOT 2
- updating setup.ini failed HOT 12
- The dependencies cannot be solved. HOT 2
- Type p of postinstall scripts must not be marked .done HOT 1
- /etc/postinstall/*.dash are required to be executed.
- Set timeout limit for mirror benchmark? HOT 5
- Removing orphaned auto-packages HOT 1
- Can't create '\\\\?\\C:\\usr\\bin\\free.exe' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apt-cyg.