4º. 1er cuatrimestre. Itinerario de Sistemas de la Información. Grado en Ingeniería Informática. ULL
➜ gh-cli-graphql-casiano-rodriguez-leon-alumnoudv5 git:(main) ✗ ./gh-repo-rename-aluXXXX -o ULL-ESIT-DMSI-1922 -r prueba-funciona -n prueba
➜ gh-cli-graphql-casiano-rodriguez-leon-alumnoudv5 git:(main) ✗ ./gh-repo-rename-aluXXXX -o ULL-ESIT-DMSI-1922 -r prueba-funciona -n prueba
gh: Could not resolve to a Repository with the name 'ULL-ESIT-DMSI-1922/prueba-funciona'.
➜ gh-cli-graphql-casiano-rodriguez-leon-alumnoudv5 git:(main) ✗ ./gh-repo-rename-aluXXXX -o ULL-ESIT-DMSI-1920 -r prueba -n prueba-antonella
gh: Name already exists on this account
#!/usr/bin/env bash
# Determine if an executable is in the PATH
if ! type -p node >/dev/null; then
echo "Node not found on the system. Can't work" >&2
exit 1
fi
# ${BASH_SOURCE[0]} (or, more simply, $BASH_SOURCE[1] ) contains the (potentially relative) path of the containing
# script in all invocation scenarios, notably also when the script is sourced, which is not true for $0.
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
node ${SCRIPT_DIR}/gh-repo-rename-aluXXXX.js "$@"
Entendiendo el script:
#SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
SCRIPT_DIR="$( dirname -- "${BASH_SOURCE[0]}" )"
SCRIPT_DIR="$( dirname -- "${BASH_SOURCE[0]}" )"
WITH0="$( dirname -- "$0")"
echo $WITH0 $SCRIPT_DIR
Ejecuciones:
[~/campus-virtual/1920/dmsi1920/apuntes(master)]$ bash /tmp/bash_source
/tmp/bash_source /tmp
[~/campus-virtual/1920/dmsi1920/apuntes(master)]$ bash /tmp/bash_source
/tmp /tmp
[~/campus-virtual/1920/dmsi1920/apuntes(master)]$ . /tmp/bash_source
. /tmp
Node.js 8 the Right Way GitHub. versión de 2013.
Node.js in Action, Second Edition by: Bradley Meck Alex Young and Mike Cantelon. Acceda por medio del PuntoQ de la ULL