Skip to content

shell scripts, awk and other scripts to keep your (git) development environment fresh and managed.

License

Notifications You must be signed in to change notification settings

GerHobbelt/developer-utility-commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Directory Usage : Housekeeping scripts

This directory contains utility scripts and applications (as submodules) which are included to assist the developers and their build/test/etc. processes.

One example is the ws_police.sh shell script (to be run in a bash shell; MSys bash on Windows) which runs the include wsclean application to strip whitespace and expand tabs to spaces in the selected source files to ensure you have a standardized source file formatting, which helps reduce 'oddities' on multiple platforms (UNIX bs. MAC vs. Windows; we've already had our share of EndOfLine trouble with MAC) and simplifies/reduces conflict resolution and edit comparison work (which would be using Scootersoft Beyond Compare (on Windows) or a similar tool to assist the git processes in a more graphically enhanced and easy way).

The scripts located in this directory include comments at the top which explain what each script is used for. Some scripts may be generated by others: we store generated content in git to simplify working with the project for developers which do not have all the used tools present on their machines (several people suggest revision control systems should not include generated output; I'm more pragmatic in this and hence have to disagree on that issue.)

  • git_push_pull.sh: pull & push all submodules; ignores push failure responses which you will see for any submodule which you don't have push access rights for. One-stop big-bang shop for push/pulling the entire project.

  • collect_git_remote_add_recusively.sh: collect all git remote entries for all submodules; writes these into the register_git_remotes_recursive.sh script file so other users of this repository can quickly configure their submodules with the same set of 'remotes'.

  • register_git_remotes_recursive.sh: bulk-add git remotes for all submodules. Generated by the script above.

  • nuke-all-build-directories.sh

    NOTE: the scripts accepts a directory as single parameter; when none is provided the current directory is assumed.

    Go through all the development project directories, find any GCC and MSVC output directories that can be safely erased and then rm -rf those directories in bulk.

    Sample usage:

    # make this directory the current directory; 
    # (this is its path in my own dev environment, change it to suit yours)
    cd /z/lib/tooling/qiqqa/MuPDF/platform/win32
    # nuke anything in the /z/lib/tooling/qiqqa/MuPDF/ tree:
    ./nuke-all-build-directories.sh ../../
    

    Notes:

    • the accompanying nuke-all-build-directories.js script is there to analyze the directories located by the shell script, filter the results using some basic heuristics and produce the bulk erase script nuke-all-build-directories-exec.sh. This one should be cleaned up afterwards, but we don't do that yet for reasons of debugging/inspection.

      It turns out it's easier to keep that generated script around after the fact for that rare occasion where things go pearshaped: you then have a good chance to investigate the culprit after damage done and thus an easier option to decide how much damage has been done; no uncertainty about whether a certain directory has been hit by rm -rf or not.

  • nuke-all-npm-node_modules-directories.sh :: nuke all the installed node npm packages everywhere

    NOTE: the scripts accepts a directory as single parameter; when none is provided the current directory is assumed.

    NOTE: this (and the other nuke script) are now also available in the generic tools/utility directory / repo https://github.com/GerHobbelt/developer-utility-commands as this is more relevant for other projects.

    Go through all the development project directories, find any npm installed packages that can be safely erased and then rm -rf those node_modules directories in bulk.

    Sample usage:

    # make this directory the current directory; 
    # (this is its path in my own dev environment, change it to suit yours)
    cd /z/lib/tooling/qiqqa/MuPDF/platform/win32
    # nuke anything in the /z/lib/tooling/qiqqa/ tree:
    ./nuke-all-npm-node_modules-directories.sh ../../../
    

    Notes:

    • the accompanying nuke-all-npm-package-node_modules-directories.js script is there to analyze the directories located by the shell script, filter the results using some basic heuristics and produce the bulk erase script.

About

shell scripts, awk and other scripts to keep your (git) development environment fresh and managed.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published