33 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
which nix && test -z "$NIX_SHELL_XRF" && {
 | 
						|
 | 
						|
  # automatically mirror main between forgejo<->codeberg
 | 
						|
  #git(){
 | 
						|
  #  set -x
 | 
						|
  #  test $1 = "push" && test $3 = main && mirror=1 
 | 
						|
  #  $(which git) "$@"
 | 
						|
  #  test -n "$mirror" && {
 | 
						|
  #    set -x
 | 
						|
  #    shift ; shift # remove first to args
 | 
						|
  #    $(which git) push codeberg "$@" 
 | 
						|
  #  }
 | 
						|
  #  set +x
 | 
						|
  #}
 | 
						|
 | 
						|
  echo '[i] installing nix-shell' && nix-shell 
 | 
						|
}
 | 
						|
 | 
						|
test "$GITEA_ROOT_URL" = "https://forgejo.isvery.ninja/" && {
 | 
						|
  # on the website xrfragment.org copy examples to root-dir 
 | 
						|
  # (so https://xrfragment.org/index.glb can be requested remotely)
 | 
						|
  # because that really emphasizes a nice WebXR experience-at-website-root paradigm
 | 
						|
  wget "https://raw.codeberg.page/coderofsalvation/xrfragment-haxe/example/assets/index.glb"
 | 
						|
  test -d dist && rm -rf dist 
 | 
						|
  mkdir dist
 | 
						|
  cd dist
 | 
						|
  wget "https://raw.codeberg.page/coderofsalvation/xrfragment-haxe/dist/xrfragment.aframe.all.js"
 | 
						|
  wget "https://raw.codeberg.page/coderofsalvation/xrfragment-haxe/dist/xrfragment.aframe.js"
 | 
						|
  wget "https://raw.codeberg.page/coderofsalvation/xrfragment-haxe/dist/xrfragment.js"
 | 
						|
  wget "https://raw.codeberg.page/coderofsalvation/xrfragment-haxe/dist/xrfragment.module.js"
 | 
						|
  wget "https://raw.codeberg.page/coderofsalvation/xrfragment-haxe/dist/xrfragment.three.js"
 | 
						|
  wget "https://raw.codeberg.page/coderofsalvation/xrfragment-haxe/dist/xrfragment.three.module.js"
 | 
						|
}
 |