Skip to content
Snippets Groups Projects

ajouter GitLab-CI

Merged Olivier Maury requested to merge gitlab-ci into main
6 files
+ 158
39
Compare changes
  • Side-by-side
  • Inline
Files
6
+ 18
25
@@ -16,33 +16,26 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
TOKEI2SLOCCOUNT=$(dirname $0)/tokei2sloccount.py
ROOT_DIR=$(dirname $(dirname $0))
TOKEI2CLOC=$(dirname $0)/tokei2cloc.py
TOKEITGZ=tokei-v7.0.3-x86_64-unknown-linux-gnu.tar.gz
if [ ! -f bin/tokei ]; then
mkdir -p ~/tmp bin
if [ ! -f ~/tmp/$TOKEITGZ ]; then
wget "https://github.com/Aaronepower/tokei/releases/download/v7.0.3/$TOKEITGZ" -O ~/tmp/$TOKEITGZ
TOKEI=$(command -v tokei)
if [ ! -x "$TOKEI" ]; then
TOKEITGZ=tokei-x86_64-unknown-linux-gnu.tar.gz
if [ ! -f bin/tokei ]; then
mkdir -p ~/tmp
if [ ! -f ~/tmp/$TOKEITGZ ]; then
wget "https://github.com/Aaronepower/tokei/releases/download/v12.1.2/$TOKEITGZ" -O ~/tmp/$TOKEITGZ
fi
tar zxf ~/tmp/$TOKEITGZ -C bin
fi
tar zxf ~/tmp/$TOKEITGZ -C bin
TOKEI=bin/tokei
fi
if [ -f bin/tokei ]; then
mkdir -p target
#bin/tokei -f -o json src | $TOKEI2SLOCCOUNT > target/sloccount.sc
bin/tokei -f -o json src | $TOKEI2CLOC > target/cloc.xml
exit
if [ ! -f $TOKEI ]; then
echo "Strange, $TOKEI does not exist!"
exit 1
fi
SLOCCOUNT=$(which sloccount);
if [ "$SLOCCOUNT" != "" ]; then
DATADIR=$(dirname $0)/.slocdata;
if [ ! -f $DATADIR ]; then
mkdir -p $DATADIR;
fi
mkdir -p target ;
/usr/bin/sloccount --datadir $DATADIR --duplicates --wide --details src > target/sloccount.sc;
else
echo "sloccount not found!";
fi
\ No newline at end of file
echo "tokei is installed at $TOKEI"
$TOKEI --version
mkdir -p $ROOT_DIR/target
$TOKEI -f -o json $ROOT_DIR/src | $TOKEI2CLOC > target/cloc.xml
Loading