From b0905b2aebe0141d2fe6d9ec7286a7d806e17c6c Mon Sep 17 00:00:00 2001 From: Dridi Boukelmoune Date: Wed, 4 Dec 2013 23:43:09 +0100 Subject: [PATCH] Initial import (#1033967) --- .gitignore | 1 + ShellCheck.spec | 123 ++++++++++++++++++++++++++++++++++++++++++++++++ d4bc0f6.diff | 21 +++++++++ sources | 1 + 4 files changed, 146 insertions(+) create mode 100644 ShellCheck.spec create mode 100644 d4bc0f6.diff diff --git a/.gitignore b/.gitignore index e69de29..9ad667f 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/v0.2.0.tar.gz diff --git a/ShellCheck.spec b/ShellCheck.spec new file mode 100644 index 0000000..785464f --- /dev/null +++ b/ShellCheck.spec @@ -0,0 +1,123 @@ +%global pkg_name ShellCheck + +Name: %{pkg_name} +Version: 0.2.0 +Release: 3%{?dist} +Summary: Tool for checking common errors in POSIX shell scripts + +License: AGPLv3+ +URL: http://www.shellcheck.net/about.html +Source0: https://github.com/koalaman/shellcheck/archive/v%{version}.tar.gz + +# https://github.com/koalaman/shellcheck/issues/44 +Patch0: https://github.com/koalaman/shellcheck/commit/d4bc0f6.diff + +BuildRequires: ghc-Cabal-devel +BuildRequires: ghc-rpm-macros +# Begin cabal-rpm deps: +BuildRequires: ghc-containers-devel +BuildRequires: ghc-directory-devel +BuildRequires: ghc-json-devel +BuildRequires: ghc-mtl-devel +BuildRequires: ghc-parsec-devel +BuildRequires: ghc-regex-compat-devel +# End cabal-rpm deps + + +%description +The goals of ShellCheck are: + + - To point out and clarify typical beginner's syntax issues, + that causes a shell to give cryptic error messages. + + - To point out and clarify typical intermediate level semantic problems, + that causes a shell to behave strangely and counter-intuitively. + + - To point out subtle caveats, corner cases and pitfalls, that may cause an + advanced user's otherwise working script to fail under future circumstances. + + +%package -n ghc-%{name} +Summary: Haskell %{name} library + + +%description -n ghc-%{name} +This package provides the Haskell %{name} shared library. + + +%package -n ghc-%{name}-devel +Summary: Haskell %{name} library development files +Provides: ghc-%{name}-static = %{version}-%{release} +Requires: ghc-compiler = %{ghc_version} +Requires(post): ghc-compiler = %{ghc_version} +Requires(postun): ghc-compiler = %{ghc_version} +Requires: ghc-%{name}%{?_isa} = %{version}-%{release} + + +%description -n ghc-%{name}-devel +This package provides the Haskell %{name} library development files. + + +%prep +%setup -q -n shellcheck-%{version} +%patch0 -p1 + +cat >Setup.hs < - 0.2.0-3 +- rebuilt + +* Tue Dec 03 2013 Dridi Boukelmoune - 0.2.0-3 +- s/shell/POSIX shell/ in summary +- LICENSE and README co-owned by sub-packages + +* Sat Nov 30 2013 Dridi Boukelmoune - 0.2.0-2 +- added a patch for "for arg do" loops (d4bc0f6) + +* Sat Nov 23 2013 Dridi Boukelmoune - 0.2.0-1 +- spec file generated by cabal-rpm-0.8.6 +- added the description from the README +- fixed broken bits from the generated spec diff --git a/d4bc0f6.diff b/d4bc0f6.diff new file mode 100644 index 0000000..e76da64 --- /dev/null +++ b/d4bc0f6.diff @@ -0,0 +1,21 @@ +diff --git a/ShellCheck/Parser.hs b/ShellCheck/Parser.hs +index 94536ee..7013547 100644 +--- a/ShellCheck/Parser.hs ++++ b/ShellCheck/Parser.hs +@@ -1384,6 +1384,7 @@ prop_readForClause5 = isOk readForClause "for ((i=0;i<10 && n>x;i++,--n))\ndo \n + prop_readForClause6 = isOk readForClause "for ((;;))\ndo echo $i\ndone" + prop_readForClause7 = isOk readForClause "for ((;;)) do echo $i\ndone" + prop_readForClause8 = isOk readForClause "for ((;;)) ; do echo $i\ndone" ++prop_readForClause9 = isOk readForClause "for i do true; done" + readForClause = called "for loop" $ do + pos <- getPosition + (T_For id) <- g_For +@@ -1408,7 +1409,7 @@ readForClause = called "for loop" $ do + readRegular = do + name <- readVariableName + spacing +- values <- readInClause <|> (readSequentialSep >> return []) ++ values <- readInClause <|> (optional readSequentialSep >> return []) + return $ \id group -> (return $ T_ForIn id name values group) + + prop_readSelectClause1 = isOk readSelectClause "select foo in *; do echo $foo; done" diff --git a/sources b/sources index e69de29..8049760 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +eb938bca816e2ccc75c31f44adde1f9d v0.2.0.tar.gz