1st test
This commit is contained in:
parent
b76111f017
commit
a5ea0292f2
2
Makefile
2
Makefile
|
@ -5,3 +5,5 @@ shellcheck-%:
|
||||||
|
|
||||||
shellspec-%:
|
shellspec-%:
|
||||||
shellspec $*
|
shellspec $*
|
||||||
|
|
||||||
|
~/.zen/secret.june:
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
i_am() {
|
||||||
|
echo 'v0.4'
|
||||||
|
}
|
||||||
|
|
||||||
|
i_am_root() {
|
||||||
|
[ $(id -u) -eq 0 ]
|
||||||
|
}
|
||||||
|
|
||||||
|
i_should_install() {
|
||||||
|
[[ ! -f ~/.zen/secret.june ]]
|
||||||
|
}
|
|
@ -1,13 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -x
|
||||||
|
. ./include.sh
|
||||||
########################################################################
|
########################################################################
|
||||||
# Version: 0.3
|
# Version: 0.4
|
||||||
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||||
########################################################################
|
########################################################################
|
||||||
{
|
{
|
||||||
[ $(id -u) -eq 0 ] && echo "LANCEMENT root INTERDIT. Utilisez un simple utilisateur du groupe \"sudo\" SVP" && exit 1
|
i_am_root && echo "LANCEMENT root INTERDIT. Utilisez un simple utilisateur du groupe \"sudo\" SVP" && exit 1
|
||||||
|
|
||||||
# MAIN #
|
# MAIN #
|
||||||
if [[ ! -f ~/.zen/secret.june ]];
|
if i_should_install;
|
||||||
then
|
then
|
||||||
|
|
||||||
# Check requirements
|
# Check requirements
|
||||||
|
|
|
@ -1,15 +1,19 @@
|
||||||
#shellcheck shell=sh
|
#shellcheck shell=sh
|
||||||
|
|
||||||
Describe "AstrXbian"
|
Describe 'AstrXbian'
|
||||||
Describe "install()"
|
Describe 'install()'
|
||||||
install() {
|
Include ./include.sh
|
||||||
echo #
|
It 'should be me'
|
||||||
}
|
When call i_am
|
||||||
|
The output should eq 'v0.4'
|
||||||
It "installs world, but not implemented"
|
End
|
||||||
Pending "You should implement install function"
|
It 'should not be superuser'
|
||||||
When call install world
|
When call i_am_root
|
||||||
The output should eq "amen"
|
The status should not be success
|
||||||
|
End
|
||||||
|
It 'should install AstrXbian'
|
||||||
|
When call i_should_install
|
||||||
|
The status should be success
|
||||||
End
|
End
|
||||||
End
|
End
|
||||||
End
|
End
|
||||||
|
|
Loading…
Reference in New Issue