publish.sh script repaired