Giter Site home page Giter Site logo

Comments (14)

kaushalmodi avatar kaushalmodi commented on July 21, 2024 1

I went ahead and replaced git_force_update.csh with force_update_emacsd.sh.

646b859

In tcsh, I use this alias:

alias update_emacs_config '(set e="/tmp/${USER}_force_update_emacsd.sh" \\
                           && curl https://raw.githubusercontent.com/kaushalmodi/.emacs.d/master/force_update_emacsd.sh >! $e \\
                           && chmod 0755 $e \\
                           && $e \!:1)'

from .emacs.d.

hhnr avatar hhnr commented on July 21, 2024 1

Works without any errors. Tested with bash on Ubuntu system.

RHEL probably has sh symlinked to bash.

In case of debian based systems it is symlinked to dash.

hari@hari-laptop:~$ ll /bin/sh
lrwxrwxrwx 1 root root 4 Nov  1 10:31 /bin/sh -> dash*

from .emacs.d.

kaushalmodi avatar kaushalmodi commented on July 21, 2024 1

Thanks, I was almost going to do that as I do the same for perl. I assumed that bash would be fine.

But there you go ( bd11312 ). I cannot not do the right thing. :)

from .emacs.d.

hhnr avatar hhnr commented on July 21, 2024

any reason you are using csh script in the first place?

from .emacs.d.

kaushalmodi avatar kaushalmodi commented on July 21, 2024

@rdotdk work

from .emacs.d.

hhnr avatar hhnr commented on July 21, 2024

Work laptop? Okay. Let me guess RHEL?

from .emacs.d.

kaushalmodi avatar kaushalmodi commented on July 21, 2024

Work laptop?

Sort of, virtual machine.

RHEL?

Yup

from .emacs.d.

hhnr avatar hhnr commented on July 21, 2024

@kaushalmodi the script seems to fail with ./force_update_emacsd.sh: [[: not found error. I think the first line #!/bin/sh should be #!/bin/bash.

from .emacs.d.

kaushalmodi avatar kaushalmodi commented on July 21, 2024

@rdotdk Thanks for trying. RHEL probably has sh symlinked to bash. So I didn't notice it. Let me see if I can use [ instead of [[. If not, will change the shebang to bash.

from .emacs.d.

kaushalmodi avatar kaushalmodi commented on July 21, 2024

RHEL probably has sh symlinked to bash.

Of course it is :)

> sh --version       
GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

from .emacs.d.

kaushalmodi avatar kaushalmodi commented on July 21, 2024

As I cannot try the "real sh" on my system, I am going with what you suggested.

@rdotdk Try out after updating to cc6e09d

from .emacs.d.

kaushalmodi avatar kaushalmodi commented on July 21, 2024

Works without any errors. Tested with bash on Ubuntu system.

Thanks for confirming!

from .emacs.d.

kaushalmodi avatar kaushalmodi commented on July 21, 2024

Note to self: Never use #!/bin/sh in shebangs.

from .emacs.d.

hhnr avatar hhnr commented on July 21, 2024

Yes. Also the paths shouldn't be mentioned directly in the shebang, instead #!/usr/bin/env bash should be used for portability.

from .emacs.d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.