#!/bin/bash echo "Deploy module in RCM environment" # Get the current version version=$(git describe --tags) # Copy Python module ipath=/home/operateur/.local/lib/python3.6/site-packages/ArchiveExtractor mkdir -p $ipath cp ArchiveExtractor/*.py $ipath/ -rvf # cwAWKSed the __init__.py file to replace the version variable awk -v version="$version" '{ gsub("AUTOVERSIONREPLACE",version) ; print}' ArchiveExtractor/__init__.py > $ipath/__init__.py