Giter Site home page Giter Site logo

Comments (3)

gehaxelt avatar gehaxelt commented on August 22, 2024

Hi,

that's because zsh does not have "declare". Afaik this is a bash feature [0].

You should try: $> bash gitdumper.sh

[0] https://stackoverflow.com/questions/10194861/bash-zsh-declare-oh-my

EDIT: Sorry, didn't carefully read the issue (I'm on vacation... :)). I'm not sure, why the bash gitdumper.sh does not work? Can you try to switch to a bash first and then running the script from there?

$zsh> bash
$bash> gitdumper.sh

from gittools.

voldedore avatar voldedore commented on August 22, 2024

Hi,
Thanks for your quick reply. As mentioned from my first post, I switched to bash first then bash gitdumper.sh (even ./gitdumper.sh) but the same error keeps occuring. My PC (with fedora) is running with the same Zsh settings as my mac at work but everything worked perfectly.

Will try again next Monday by your advice. I meant I will try with the command which is only gitdumper.sh

Edited:
Hope this will help you to figure out about this issue. I tested on:

  • Fedora 26 (zsh)
    (zsh) bash gitdumper.sh --> ok
    (zsh) ./gitdumper.sh --> ok
    (zsh) bash --> change to bash
    (bash) ./gitdumper.sh --> ok
    (bash) bash gitdumper.sh --> ok

  • macOS 10.12 (zsh)
    (zsh) bash gitdumper.sh --> NG
    (zsh) bash --> change to bash
    (bash) bash gitdumper.sh --> NG
    (bash) ./gitdumper.sh --> NG

I chmodded u+x the shell file and do the command with the same user.

from gittools.

voldedore avatar voldedore commented on August 22, 2024

Hi, I finally get it resolved.

The old version of Apple's built-in bash is the cause of all this.

╰─ /bin/bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16)
Copyright (C) 2007 Free Software Foundation, Inc.

After installing new bash from homebrew, everything seems to properly work now.

brew install bash
╰─ /usr/local/bin/bash --version
GNU bash, version 4.4.12(1)-release (x86_64-apple-darwin16.3.0)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
╰─ /usr/local/bin/bash gitdumper.sh
###########
# GitDumper is part of https://github.com/internetwache/GitTools
#
# Developed and maintained by @gehaxelt from @internetwache
#
# Use at your own risk. Usage might be illegal in certain circumstances.
# Only for educational purposes!
###########


[*] USAGE: http://target.tld/.git/ dest-dir [--git-dir=otherdir]
		--git-dir=otherdir		Change the git folder name. Default: .git

from gittools.

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.