]> cygwin.com Git - cygwin-apps/setup.git/blame - script.h
2003-06-23 Max Bowsher <maxb@ukf.net>
[cygwin-apps/setup.git] / script.h
CommitLineData
bc78a6d5
RC
1/*
2 * Copyright (c) 2001, Jan Nieuwenhuizen.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * A copy of the GNU General Public License can be found at
10 * http://www.gnu.org/
11 *
12 * Written by Jan Nieuwenhuizen <janneke@gnu.org>
13 *
14 */
c93bc6d0
MB
15#ifndef SETUP_SCRIPT_H
16#define SETUP_SCRIPT_H
bc78a6d5 17
3c054baf 18#include "String++.h"
bc78a6d5 19
bc78a6d5
RC
20/* Initialisation stuff for run_script: sh, cmd, CYGWINROOT and PATH */
21void init_run_script ();
22
23/* Run the scripts fname.sh and fname.bat, found in dir. */
3c054baf 24void try_run_script (String const &dir, String const &fname);
bc78a6d5 25
ad646f43 26class Script {
39ba3555
MB
27public:
28 static bool isAScript (String const &file);
29 Script (String const &fileName);
30 String baseName() const;
31 String fullName() const;
2533f348
RC
32/* Run the script. If it it's suffix is .sh, and
33 we have a Bourne shell, execute it using sh. Otherwise, if the
34 suffix is .bat, execute using cmd */
34ea5b6d 35 void run() const;
39ba3555
MB
36private:
37 String scriptName;
38 static char const ETCPostinstall[];
1e3b2ad4 39 char const * extension() const;
ad646f43
RC
40};
41
c93bc6d0 42#endif /* SETUP_SCRIPT_H */
This page took 0.036006 seconds and 5 git commands to generate.