Skip to content

Instantly share code, notes, and snippets.

@lool
lool / snapcraft.yaml
Created March 31, 2017 12:09
Initial LimeSuite snap
name: limesuite-lool
version: 16.8.23.0
summary: LimeSuite apps
description: LimeSuite command line utility and Graphical eval app.
confinement: strict
apps:
LimeUtil:
command: LimeUtil
plugs: [network, home]
@lool
lool / build-openwrt.sh
Created March 25, 2017 00:33
OpenWRT build script
#!/bin/sh
set -e -x
# for Ubuntu 16.04
#PACKAGES="git build-essential libssl-dev libncurses5-dev unzip gawk python subversion mercurial"
PACKAGES="git build-essential libssl-dev libncurses5-dev unzip gawk python subversion"
sudo apt -y install $PACKAGES
if ! [ -d openwrt ]; then
@lool
lool / build-ops.sh
Created March 25, 2017 00:28
OpenSwitch (classic stack, aka OPS) snap build scripts
#!/bin/sh
set -e -x
# snapcraft deps for Ubuntu 16.04
SNAPCRAFT_PACKAGES="python3-jsonschema python3-magic python3-xdg python3-requests-oauthlib python3-ssoclient python3-progressbar python3-requests-toolbelt python3-docopt python3-petname"
sudo apt -y install $SNAPCRAFT_PACKAGES
if ! [ -d snapcraft ]; then
git clone https://github.com/ubuntu-core/snapcraft
@lool
lool / build-onie.sh
Last active October 9, 2023 07:50
Build ONIE VM image
#!/bin/sh
set -e
PACKAGES="git qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils virt-manager git realpath autoconf bison flex texinfo libtool libtool-bin libncurses5-dev gawk gperf stgit build-essential fakeroot libexpat1-dev python-dev xorriso mtools dosfstools"
ONIE_URL="https://github.com/opencomputeproject/onie.git"
# needed to locate mkdosfs
export PATH=$PATH:/sbin:/usr/sbin
parts:
zulu-8-arm:
plugin: copy
source: https://zulu/.../zulu-8-arm.tar.gz
files:
"*": "opt/zulu/"
snap:
- opt/zulu/jre
build-environment:
- PATH: "opt/zulu/bin:$PATH"
#!/usr/bin/env python
import json, os, subprocess, sys, urllib2
from termcolor import cprint
from xml.dom import minidom
def abort(error):
cprint(error, color='red', file=sys.stderr)
exit(1)