Git Product home page Git Product logo

bash's Introduction

Bash

Here I'll be adding whatever bash scripts I write as I learn/hack the language. Here are the first two I've come up with:

Makegen

A simple makefile generator. Give it a compilation instruction (default gcc) and a list of files, and it will add them to a makefile.

> ./makegen.sh main.c
adding file 'main.c'
no instructions specified, defaulting to 'gcc'
adding files:
adding make target main.c to makefile...
warning: main.c does not exist, are you sure you're in the right folder?
Finished generating makefile at /Users/thinkpad20/workspace/bash/Makefile:

all: main.c
   c main.c

When I expand it, it will create an all instruction with all arguments specified, as well as individual make instructions. Maybe more later.

Defc

Creates a C source file with standard boilerplate. stdio.h and stdlib.h are included by default. You can pass in whatever other include files you want. A -g tag means the include should be a global include (using <>).

> ./defc.sh foobar.c foobar.h -g string.h
C file created at foobar.c:
#include <stdio.h>
#include <stdlib.h>
#include "foobar.h"
#include <string.h>

int main(int argc, char *argv[]) {
   return 0;
}

The program will not overwrite an existing file unless -f is passed in.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.