Skip to content

Instantly share code, notes, and snippets.

@CristianoRC
Last active May 5, 2021 15:05
Show Gist options
  • Save CristianoRC/3b3e2436279c4c35294bf8a238b69cb4 to your computer and use it in GitHub Desktop.
Save CristianoRC/3b3e2436279c4c35294bf8a238b69cb4 to your computer and use it in GitHub Desktop.
#!/bin/bash
REPOSITORY_DIR="$PWD/"
CHALLENG=$1
RESULT_DIR=${REPOSITORY_DIR}/.trybe/expected-results
RESULT_BKP_DIR=${REPOSITORY_DIR}/.trybe/expected-results-bkp
EVALUETE_FILE=${REPOSITORY_DIR}/scripts/evaluate.sh
mv $RESULT_DIR $RESULT_BKP_DIR
mkdir $RESULT_DIR
cp $RESULT_BKP_DIR/desafio$CHALLENG $RESULT_DIR
$EVALUETE_FILE
rm -rf $RESULT_DIR
mv $RESULT_BKP_DIR $RESULT_DIR
rm -rf $RESULT_DIR_DIR
@jfredericoneto
Copy link

Fala @CristianoRC !

Queria sugerir uma alteração nas linhas 3 e 4:

REPOSITORY_DIR="$PWD/"
CHALLENG=$1

Com isso na execução do script você não precisa especificar o caminho da pasta atual.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment