An example-based, step-by-step guide.
# Let's start! (from the git repo on the work-dir for "package_name-1.2.3"):
> git am ../../../patches/<package_name-1.2.3.patchset>
/////////////////////////////////////////////////////////////////////////////// | |
// Beta4, 64 bits, SATA HDD 5400 RPM: | |
/////////////////////////////////////////////////////////////////////////////// | |
[~/Desktop ] | |
> df | |
Mount Type Total Free Flags Device | |
----------------- --------- --------- --------- ------- ------------------------ | |
/boot bfs 20.0 GiB 9.7 GiB QAM-P-W /dev/disk/ata/1/master/2_1 | |
/boot/system packagefs 4.0 KiB 4.0 KiB QAM-P-- |
#!python3 | |
""" | |
Usage: | |
> compare_package.py package_name | |
Compares contents (disregarding files' sizes and timestamps) of the given package_name from: | |
/system/packages/package_name-*.hpkg |
#!python3 | |
""" | |
Proof of concept for `pkgman search --not-required`. | |
The idea is *very* simple. | |
- Get the list of installed packages. | |
- From that, builds a list of all unique requirements. | |
- Print the list of packages that do not provide any of those requirements. |
#! python3 | |
""" | |
patchset_split.py | |
Based on Paolo Bonzini's mbox_split.py: | |
https://gist.github.com/bonzini/d5bc1946475487167c529f9699e39512 | |
""" | |
import argparse |
""" | |
Test bench for Haiku's `pidof` command. | |
Requires at least Python 3.5 (for subprocess.run()). | |
Usage: | |
python3 test_pidof.py [path_to_pidof] | |
If no "path_to_pidof" is given, the one in $PATH, if any, will be used. | |
""" |
#!/bin/sh | |
# Poor-man's pidof replacement for Haiku | |
# | |
# Usage: > pidof <ProcessName> | |
if [ "$#" -eq "1" ] ; then | |
ps -o Id Team | grep $1 | grep -v 'grep' | grep -v 'pidof' | grep -o '[0-9]*' | |
fi |
# Changes over the original: | |
# | |
# + Support both Python 2 & 3. | |
# * fixed location of bitrate parameters. | |
# * Fixed track duration so it does't cuts tracks short, nor starts them early | |
# (Margin of error for .flac source files should at most be around +/- 0.013 secs). | |
# + Added pre_gap support. | |
cue_file = 'file.cue' |