Skip to content

Instantly share code, notes, and snippets.

View freitass's full-sized avatar

Leandro Freitas freitass

  • Royal Philips
  • Montréal
View GitHub Profile
@dvolpato
dvolpato / gen-buildroot-patch.sh
Last active August 29, 2015 14:08
Generate a Buildroot patch
#!/bin/sh
function ApplyChanges() {
local files_to_patch=`diff -qr build/$PKG-$PKG_VERSION.orig build/$PKG-$PKG_VERSION.patch | cut -d' ' -f2 | cut -d/ -f3-`
echo "Applying changes:"
for f in $files_to_patch
do
echo -e "\t$f"
cp -av build/$PKG-$PKG_VERSION.patch/$f build/$PKG-$PKG_VERSION/$f
done
@KensoDev
KensoDev / read_pipe.sh
Created September 7, 2014 19:00
read_pipe.sh
#!/bin/bash
DEFAULT_PIPE_NAME=".plumber"
PIPE_NAME="${1:-$DEFAULT_PIPE_NAME}"
if [ ! -p $PIPE_NAME ]; then
echo "Created pipe ${PIPE_NAME}..."
mkfifo $PIPE_NAME
fi
@jehiah
jehiah / simple_args_parsing.sh
Created March 4, 2011 16:56
a simple way to parse shell script arguments
#!/bin/sh
#
# a simple way to parse shell script arguments
#
# please edit and use to your hearts content
#
ENVIRONMENT="dev"