Basic bash if statement with hg failshg clone has stopped working on my Vista boxHow to deal with binary...
How do I locate a classical quotation?
Can't find the Shader/UVs tab
Why don't MCU characters ever seem to have language issues?
Examples of a statistic that is not independent of sample's distribution?
What does a stand alone "T" index value do?
Solving "Resistance between two nodes on a grid" problem in Mathematica
Good allowance savings plan?
Built-In Shelves/Bookcases - IKEA vs Built
They call me Inspector Morse
Why does Captain Marvel assume the people on this planet know this?
Virginia employer terminated employee and wants signing bonus returned
Why is this plane circling around the Lucknow airport every day?
Do items de-spawn in Diablo?
"One can do his homework in the library"
Finding algorithms of QGIS commands?
What Happens when Passenger Refuses to Fly Boeing 737 Max?
How do I deal with a powergamer in a game full of beginners in a school club?
How to pass a string to a command that expects a file?
Do f-stop and exposure time perfectly cancel?
Is it true that real estate prices mainly go up?
Should I tell my boss the work he did was worthless
How strictly should I take "Candidates must be local"?
Should I take out a loan for a friend to invest on my behalf?
Am I not good enough for you?
Basic bash if statement with hg fails
hg clone has stopped working on my Vista boxHow to deal with binary files in Google Code?basic bash console macHow do I diff incoming changesets with Beyond Compare 4 and hg?bash change directory with “shortcuts”What could cause “missing files” in a mercurial working directory, and what should I do to fix it?Basic Bash - If/Then with Boolean Operatorcygwin bash - if statement doesn't workBash if statementRenaming bash script's source directory from the script
I'm running Cygwin. I came across the following snippet of Bash code from the FFmpeg Wiki's guide to compiling FFmpeg:
cd /ffmpeg_sources && if cd x265 2> /dev/null; then hg pull && hg update && cd ..; else hg clone https://bitbucket.org/multicoreware/x265; fi
As I understand it, it's a pretty basic if statement that returns non-zero if a CD into directory x265 fails (i.e. if it doesn't exist), and then clones from the Mercurial repository, which would create the x265 folder ready to be pulled and updated the next time.
The error from the failed cd x265 is repressed as expected, but then I also get the following output:
abort: no repository found in '/ffmpeg_sources' (.hg not found)!
This output seems to be a result of the then hg pull && hg update && cd ..; portion of the statement, and is unexpected because at that point it should simply fall back to cloning the directory.
The only thing that occurs to me is that the code on the FFmpeg Wiki is outdated, and that Mercurial has since then implemented a fatal abort on unsuccessful location of the .hg directory. Am I right, or am I missing something obvious here?
bash cygwin redirection mercurial cd
add a comment |
I'm running Cygwin. I came across the following snippet of Bash code from the FFmpeg Wiki's guide to compiling FFmpeg:
cd /ffmpeg_sources && if cd x265 2> /dev/null; then hg pull && hg update && cd ..; else hg clone https://bitbucket.org/multicoreware/x265; fi
As I understand it, it's a pretty basic if statement that returns non-zero if a CD into directory x265 fails (i.e. if it doesn't exist), and then clones from the Mercurial repository, which would create the x265 folder ready to be pulled and updated the next time.
The error from the failed cd x265 is repressed as expected, but then I also get the following output:
abort: no repository found in '/ffmpeg_sources' (.hg not found)!
This output seems to be a result of the then hg pull && hg update && cd ..; portion of the statement, and is unexpected because at that point it should simply fall back to cloning the directory.
The only thing that occurs to me is that the code on the FFmpeg Wiki is outdated, and that Mercurial has since then implemented a fatal abort on unsuccessful location of the .hg directory. Am I right, or am I missing something obvious here?
bash cygwin redirection mercurial cd
add a comment |
I'm running Cygwin. I came across the following snippet of Bash code from the FFmpeg Wiki's guide to compiling FFmpeg:
cd /ffmpeg_sources && if cd x265 2> /dev/null; then hg pull && hg update && cd ..; else hg clone https://bitbucket.org/multicoreware/x265; fi
As I understand it, it's a pretty basic if statement that returns non-zero if a CD into directory x265 fails (i.e. if it doesn't exist), and then clones from the Mercurial repository, which would create the x265 folder ready to be pulled and updated the next time.
The error from the failed cd x265 is repressed as expected, but then I also get the following output:
abort: no repository found in '/ffmpeg_sources' (.hg not found)!
This output seems to be a result of the then hg pull && hg update && cd ..; portion of the statement, and is unexpected because at that point it should simply fall back to cloning the directory.
The only thing that occurs to me is that the code on the FFmpeg Wiki is outdated, and that Mercurial has since then implemented a fatal abort on unsuccessful location of the .hg directory. Am I right, or am I missing something obvious here?
bash cygwin redirection mercurial cd
I'm running Cygwin. I came across the following snippet of Bash code from the FFmpeg Wiki's guide to compiling FFmpeg:
cd /ffmpeg_sources && if cd x265 2> /dev/null; then hg pull && hg update && cd ..; else hg clone https://bitbucket.org/multicoreware/x265; fi
As I understand it, it's a pretty basic if statement that returns non-zero if a CD into directory x265 fails (i.e. if it doesn't exist), and then clones from the Mercurial repository, which would create the x265 folder ready to be pulled and updated the next time.
The error from the failed cd x265 is repressed as expected, but then I also get the following output:
abort: no repository found in '/ffmpeg_sources' (.hg not found)!
This output seems to be a result of the then hg pull && hg update && cd ..; portion of the statement, and is unexpected because at that point it should simply fall back to cloning the directory.
The only thing that occurs to me is that the code on the FFmpeg Wiki is outdated, and that Mercurial has since then implemented a fatal abort on unsuccessful location of the .hg directory. Am I right, or am I missing something obvious here?
bash cygwin redirection mercurial cd
bash cygwin redirection mercurial cd
asked 3 mins ago
HashimHashim
3,13963162
3,13963162
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1413539%2fbasic-bash-if-statement-with-hg-fails%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1413539%2fbasic-bash-if-statement-with-hg-fails%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown