add linting
This commit is contained in:
parent
b47b751d41
commit
f49f151668
9
.gitlab-ci.yml
Normal file
9
.gitlab-ci.yml
Normal file
@ -0,0 +1,9 @@
|
||||
image: bash
|
||||
|
||||
stages:
|
||||
- lint
|
||||
- test
|
||||
|
||||
lint:
|
||||
stage: install
|
||||
script: 'apk add shellcheck && shellcheck .bash* bin/*'
|
@ -10,7 +10,7 @@
|
||||
|
||||
# Create a time-stamped .tar file in the current directory.
|
||||
# The .tar file will be readable only to root.
|
||||
cd /var/opt/gitlab/backups/
|
||||
cd /var/opt/gitlab/backups/ || exit
|
||||
sh -c 'umask 0077; tar -cf $(date "+%s-%F-etc-gitlab.tar") -C / etc/gitlab'
|
||||
|
||||
# run GitLab system backup
|
||||
|
@ -7,16 +7,16 @@ for FILE in $FILES; do
|
||||
|
||||
# remove old versions
|
||||
if [ -f "$HOME/$FILE" ]; then
|
||||
rm $HOME/$FILE
|
||||
rm "$HOME"/"$FILE"
|
||||
elif [ -d "$HOME/$FILE" ]; then
|
||||
rm -r $HOME/$FILE
|
||||
rm -r "${HOME:?}"/"$FILE"
|
||||
fi
|
||||
|
||||
# symlink files
|
||||
ln -s $PWD/$FILE $HOME/$FILE
|
||||
ln -s "$PWD"/"$FILE" "$HOME"/"$FILE"
|
||||
echo "$(tput setaf 64)✓$(tput sgr0) Symlink created to $(tput setaf 37)$FILE$(tput sgr0)"
|
||||
|
||||
done
|
||||
|
||||
# source what we just created
|
||||
source $HOME/.profile
|
||||
source "$HOME"/.profile
|
||||
|
Loading…
Reference in New Issue
Block a user