configs  Diff

Differences From Artifact [d11721ccb4]:

To Artifact [dffe1ca736]:


303
304
305
306
307
308
309
310













































































































































































311
312
	cryptopassphrase $@ | tr -d '\n' | $clipboard
}
alias pw="pwnk -k ~/.cryptopassphrase.key"
alias pws="pwnk -k ~/.cryptopassphrase-server.key"

ixio() { curl -F 'f:1=<-' ix.io }
0x0st() { curl -F'file=@-' https://0x0.st }














































































































































































unset fgrep grep grep_color ls ls_color ls_on_cd ls_on_init simple_prompt
unset HISTFILE








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
	cryptopassphrase $@ | tr -d '\n' | $clipboard
}
alias pw="pwnk -k ~/.cryptopassphrase.key"
alias pws="pwnk -k ~/.cryptopassphrase-server.key"

ixio() { curl -F 'f:1=<-' ix.io }
0x0st() { curl -F'file=@-' https://0x0.st }

cross() {
	if [ $# = 0 ]; then
		echo 'Usage: cross platform [architecture1] [architecture2]' \
		     1>&2
		return 1
	fi

	case "$1" in
		3ds | nds)
			if [ -z "$DEVKITPRO" ]; then
				echo "Please set DEVKITPRO!" 1>&2
				return 1
			fi
			if [ -z "$DEVKITARM" ]; then
				echo "Please set DEVKITARM!" 1>&2
				return 1
			fi

			export PATH="$DEVKITARM/bin:$PATH"
			export cross_host="arm-none-eabi"
			export objfw_configure_flags="--with-$1"
			;;
		amiga)
			case "$2" in
				m68k)
					if [ -z "$amiga_gcc_path" ]; then
						echo -n "Please set " 1>&2
						echo "amiga_gcc_path!" 1>&2
						return 1
					fi

					export PATH="$amiga_gcc_path/bin:$PATH"
					export cross_host="m68k-amigaos"
					;;
				ppc)
					if [ -z "$adtools_path" ]; then
						echo -n "Please set " 1>&2
						echo "adtools_path!" 1>&2
						return 1
					fi

					export PATH="$adtools_path/bin:$PATH"
					export cross_host="ppc-amigaos"
					;;
			esac

			if [ $# != 2 -o -z "$cross_host" ]; then
				echo "Usage: cross amiga m68k|ppc" 1>&2
				return 1
			fi
			;;
		ios | iossim)
			if ! which xcrun &>/dev/null; then
				echo -n "Can only cross-compile for iOS " 1>&2
				echo "on a Mac with Xcode!" 1>&2
				return 1
			fi

			case "$1" in
				ios)
					local sdk_type=iphoneos
					local default_archs="arm64"
					;;
				iossim)
					local sdk_type=iphonesimulator
					local default_archs="x86_64"
					;;
			esac

			local sdk="$(xcrun --show-sdk-path --sdk $sdk_type)"
			local archs="${@:2}"

			if [ ${(w)#archs} = 0 ]; then
				archs="$default_archs"
			fi

			export CC="clang --sysroot $sdk"
			export CPP="clang -E --sysroot $sdk"
			export CXX="clang++ --sysroot $sdk"
			export CXXPP="clang++ -E -=sysroot $sdk"

			for arch in $=archs; do
				export CC="$CC -arch $arch"
				export CXX="$CXX -arch $arch"
			done
			export CPP="$CPP -arch $archs[(w)1]"
			export CXXPP="$CXXPP -arch $archs[(w)1]"

			export OBJC="$CC"
			export OBJCPP="$CPP"
			export OBJCXX="$CXX"
			export OBJCPPXX="$CXXPP"
			export IPHONEOS_DEPLOYMENT_TARGET="10.0"
			export cross_host="$archs[(w)1]-apple-darwin"
			;;
		mingw)
			case "$2" in
				i686 | x86_64)
					local pkg="mingw-w64-$2-gcc"
					export cross_host="$2-w64-mingw32"
					;;
			esac

			if [ $# != 2 -o -z "$cross_host" ]; then
				echo "Usage: cross mingw i686|x86_64" 1>&2
				return 1
			fi

			local prefix="$(pkg_info -qp $pkg 2>/dev/null |
			                awk '/^@cwd/ { print $2; exit }')"
			if [ -z "$prefix" ]; then
				echo "Please install $pkg from pkgsrc!" 1>&2
				return 1
			fi

			export PATH="$prefix/cross/$cross_host/bin:$PATH"
			;;
		morphos)
			local pkg="ppc-morphos-gcc-9"
			local prefix="$(pkg_info -qp $pkg 2>/dev/null |
			                awk '/^@cwd/ { print $2; exit }')"
			if [ -z "$prefix" ]; then
				echo "Please install $pkg from pkgsrc!" 1>&2
				return 1
			fi

			export PATH="$prefix/gg/bin:$PATH"
			export CC="ppc-morphos-gcc-9"
			export CXX="ppc-morphos-g++-9"
			export OBJC="$CC"
			export OBJCXX="$CXX"
			export cross_host="ppc-morphos"
			;;
		switch)
			if [ -z "$DEVKITPRO" ]; then
				echo "Please set DEVKITPRO!"
				return 1
			fi
			if [ -z $"DEVKITA64" ]; then
				echo "Please set DEVKITA64!"
				return 1
			fi

			export PATH="$DEVKITA64/bin:$PATH"
			export cross_host="aarch64-none-elf"
			export objfw_configure_flags="--with-$1"
			;;
		wii | wii-u)
			if [ -z "$DEVKITPRO" ]; then
				echo "Please set DEVKITPRO!"
				return 1
			fi
			if [ -z "$DEVKITPPC" ]; then
				echo "Please set DEVKITPPC!"
				return 1
			fi

			export PATH="$DEVKITPPC/bin:$PATH"
			export cross_host="powerpc-eabi"
			export objfw_configure_flags="--with-$1"
			;;
		*)
			echo "Unknown target: $1" 1>&2
			return 1
			;;
	esac

	export objfw_configure_flags=(
		--host=$cross_host
		$=objfw_configure_flags
	)
}

unset fgrep grep grep_color ls ls_color ls_on_cd ls_on_init simple_prompt
unset HISTFILE