cabal-scripts 0.1 → 0.1.1
raw patch · 3 files changed
+42/−3 lines, 3 files
Files
- cabal-darcs-upload +1/−1
- cabal-find-revdeps +3/−0
- cabal-scripts.cabal +38/−2
cabal-darcs-upload view
@@ -13,7 +13,7 @@ \ darcs tag $version && \ \-cabal upload dist/$package.tar.gz && \+cabal upload ${HACKAGEUSER:+--username} $HACKAGEUSER dist/$package.tar.gz && \ \ cabal-darcs-bump-version $nextversion
+ cabal-find-revdeps view
@@ -0,0 +1,3 @@+author=$1+pkg=$2+find . -name "*.cabal" | fgrep -v _ | xargs fgrep -l $author | xargs fgrep -l $pkg
cabal-scripts.cabal view
@@ -1,5 +1,5 @@ Name: cabal-scripts-Version: 0.1+Version: 0.1.1 License: BSD3 License-file: LICENSE Author: Henning Thielemann <darcs@henning-thielemann.de>@@ -42,6 +42,8 @@ This workflow makes sure, that you never have two different contents for the same version in Hackage and in your darcs repository.+ If you set the environment variable HACKAGEUSER,+ then this will be automatically used for upload. . * @cabal-darcs-repository@: Shows some lines of @Source-Repository@ fields,@@ -53,17 +55,51 @@ whereas the Cabal field may contain a public read-only access, such as @http:\/\/code.haskell.org\/~user\/mypkg\/@. .+ * @cabal-main-directory@+ If started in a source sub-directory+ then it prints the closest super-directory containing a cabal file.+ This way a build script can automatically find the directory+ where to run @cabal build@.+ .+ * @cabal-find-revdeps author package@:+ Find all Cabal files of packages of a certain author+ that import a certain package.+ This is intended for updating a bunch of packages,+ when a new version of a basic packages shall be supported.+ In this use case, @author@ should be your name+ and @package@ should be the basic package to adapt to.+ Actually the script is very silly+ and just scans for the author name and the package name+ and does not check, where in the Cabal file they occur.+ Thus be prepared for false positives search results.+ The script also filters out package paths that contain underscores+ in order to hide paths in @_darcs@ directories+ and branched darcs repositories+ that usually have names like @pkg_0@.+ I advise to process the packages with+ @+ for pkg in \`cabal-find-revdeps author package\` ; do+ (cd \`dirname $pkg\`; bash);+ done+ @.+ This @for@ loop will take you successively into every package directory.+ There you can perform some operations+ and you can browse the shell history for the commands+ you performed for the previous packages.+ If you are finished with a package, then you just call @exit@,+ and the @for@ loop automatically puts you in the next package directory. See also package @cabal-sort@ that provides the commands @cabal-sort@ and @ghc-pkg-dep@. Data-Files: cabal-test+ cabal-find-revdeps cabal-darcs-bump-version cabal-darcs-repository cabal-darcs-upload Source-Repository this- Tag: 0.1+ Tag: 0.1.1 Type: darcs Location: http://code.haskell.org/~thielema/cabal-scripts/