This guide explains how to create FreeBSD packages for your projects and host them in custom repositories.
Create pkg-manifest.ucl
with your package metadata:
#!/bin/bash | |
usage() { | |
program_name=$(basename $0) | |
bold=$(tput bold) | |
normal=$(tput sgr0) | |
cat <<EOM | |
Usage: $program_name [options] status | |
Post a status update to a Mastodon account. |
#!/bin/bash | |
bin_name=$1 | |
bin_path="node_modules/.bin/$bin_name" | |
bin_dir=$(dirname $bin_path) | |
if [ ! -f "$bin_path" ]; then | |
echo "$bin_path does not exists" | |
exit 1 | |
fi |
deno run --allow-net --unstable server.js
import { resolve } from 'https://deno.land/std@0.105.0/path/posix.ts'; | |
const CHAR_FORWARD_SLASH = 47; | |
/** | |
* Return the relative path from `from` to `to` based on current working directory. | |
* @param from path in current working directory | |
* @param to path in current working directory | |
*/ | |
export function relative(origFrom: string, origTo: string): string { |
const fileName = Deno.args[0]; | |
if(!fileName) { | |
console.error('No file provided.'); | |
Deno.exit(1); | |
} | |
let file = await Deno.open(fileName); | |
let encoder = new TextEncoder(); |
test |
function listen(fn) { | |
const gen = fn(); | |
function listener(ev) { | |
let { done } = gen.next(ev); | |
if(done) { | |
this.removeEventListener(ev.type, listener); | |
gen.return(); | |
} |