Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to tell git to use windows scripting language in hoo
Message
De
01/04/2016 12:40:09
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
01/04/2016 11:52:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01634158
Message ID:
01634161
Vues:
47
>Hi,
>
>I need to create some scripts to run in git hooks. In https://www.atlassian.com/git/tutorials/git-hooks there is the following information:
>
>
Scripting Languages
>
>The built-in scripts are mostly shell and PERL scripts, but you can use any scripting language you like as long as it can be run as an executable. The shebang line (#!/bin/sh) in each script defines how your file should be interpreted. So, to use a different language, all you have to do is change it to the path of your interpreter.
>
>Can someone explain how to use that method to tell git to use a windows friendly scripting language?
>
>TIA,
>
>Alex

Keep in mind: git question specific for redmonds OS needs windows in the google query or it will raise the wrong stuff with high probability.

This talks about Linux. In Linux the shebang tells what interpreter to use, not like M$ where the extension of a file tells what interpreter to use. You might have installed the bash for git, there it is possible to use. You might call any windows program from the bash shell like from cmd.

I use the bash for git because bash is better then cmd or windows scripting anyway, better documentation, wider spread support by community - and most stuff about git you will find is Linux based, so way should I care about windows?

Just run a bash script in the bash emulation. I do it all the time to call difftool, for example, under windoof. It runs pretty well. It's good idea, since M$ starts to integrate bash commands into it's X OS.

If you insist on the MS scripting this might help:
google for
git hook script windows;
git bash script windows;
git hooks windows example

It might be the most simple to create a bash script as hook that will call something else and put the parameters through.

Bash is pretty well documented, much better then anything MS has done the last 10 years or so. Also there is much much more examples out there then you might think. It's not that tricky.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform