Skip to content

Commit

Permalink
chore: use temp_bashunit instead of just temp directory name
Browse files Browse the repository at this point in the history
  • Loading branch information
Chemaclass committed Oct 31, 2023
1 parent 1040539 commit 53ba5fa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ cat bashunit >> bin/temp.sh
grep -v '^source' bin/temp.sh > bin/bashunit
rm bin/temp.sh

chmod +x bin/bashunit
chmod u+x bin/bashunit

echo "Build complete. bashunit has been generated in the bin folder."
11 changes: 5 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ TAG="$LATEST_BASHUNIT_VERSION"

function install_main() {
echo "> Downloading non-stable main"
git clone --depth 1 --no-tags https://github.com/TypedDevs/bashunit temp
cd temp
git clone --depth 1 --no-tags https://github.com/TypedDevs/bashunit temp_bashunit
cd temp_bashunit
./build.sh
cd ..
cp temp/bin/bashunit bashunit
chmod u+x bashunit
cp temp_bashunit/bin/bashunit bashunit
sed -i -e 's/BASHUNIT_VERSION=".*"/BASHUNIT_VERSION="(non-stable) main"/g' bashunit
rm -rf temp
echo "> bashunit has been installed in the 'lib' folder"
rm -rf temp_bashunit
echo "> bashunit has been installed in the '$DIR' folder"
}

function install_concrete_version() {
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/install_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function test_install_downloads_the_given_version() {
}

function test_install_downloads_the_main_version() {
mock git "cp -r .. temp"
mock git "cp -r .. temp_bashunit"
local install_dir="./lib/bashunit"
local output

Expand Down

0 comments on commit 53ba5fa

Please sign in to comment.