···11+#!/usr/bin/env bash
22+set -e
33+if [[ ! -d "/home/nel/Documents/code/desktop/pds-migrate" ]]; then
44+ echo "Cannot find source directory; Did you move it?"
55+ echo "(Looking for "/home/nel/Documents/code/desktop/pds-migrate")"
66+ echo 'Cannot force reload with this script - use "direnv reload" manually and then try again'
77+ exit 1
88+fi
99+1010+# rebuild the cache forcefully
1111+_nix_direnv_force_reload=1 direnv exec "/home/nel/Documents/code/desktop/pds-migrate" true
1212+1313+# Update the mtime for .envrc.
1414+# This will cause direnv to reload again - but without re-building.
1515+touch "/home/nel/Documents/code/desktop/pds-migrate/.envrc"
1616+1717+# Also update the timestamp of whatever profile_rc we have.
1818+# This makes sure that we know we are up to date.
1919+touch -r "/home/nel/Documents/code/desktop/pds-migrate/.envrc" "/home/nel/Documents/code/desktop/pds-migrate/.direnv"/*.rc