Skip to content

Instantly share code, notes, and snippets.

@wor
wor / oe-buildenv-internal.patch
Created August 11, 2013 12:40
Poky-git: Quick patch to fix python version check to use env.
diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal
index bba6f8f..c4aa52a 100755
--- a/scripts/oe-buildenv-internal
+++ b/scripts/oe-buildenv-internal
@@ -43,7 +43,7 @@ fi
# Similarly, we now have code that doesn't parse correctly with older
# versions of Python, and rather than fixing that and being eternally
# vigilant for any other new feature use, just check the version here.
-py_v26_check=`python -c 'import sys; print sys.version_info >= (2,7,3)'`
+py_v26_check=`/usr/bin/env python -c 'import sys; print sys.version_info >= (2,7,3)'`
@wor
wor / recur0.sh
Last active December 16, 2015 06:59
Testing bash recursion and local/global variables. Initial example from: http://tldp.org/LDP/abs/html/localvar.html
#!/bin/bash
# from: http://tldp.org/LDP/abs/html/localvar.html
# recursion-demo.sh
# Demonstration of recursion.
RECURSIONS=9 # How many times to recurse.
r_count=0 # Must be global. Why?
recurse ()
{
@wor
wor / Makefile_pod.patch
Created July 26, 2012 17:44
Makefile patch for devscripts-2.10.69+squeeze2. Fixes "Spurious =pod command at line.." errors.
--- po4a/Makefile 2012-07-26 12:29:17.194077660 +0300
+++ po4a/Makefile 2012-07-26 12:29:09.604077482 +0300
@@ -14,6 +14,11 @@
rm -f $(GEN_TR_MAN1S) translate ../scripts/devscripts.1
fr/%.fr.1: fr/%.fr.pl translate
+ if test "$<" == "fr/dcontrol.fr.pl" -o \
+ "$<" == "fr/dget.fr.pl" -o \
+ "$<" == "fr/rmadison.fr.pl"; then \
+ sed -i 's/^=pod//' $<; \