Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Misc issues in shell scripts (codefator.io).
[simgrid.git] / tools / internal / check_dist_archive
index 963a4a3..34da5e4 100755 (executable)
@@ -1,6 +1,6 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
-# Copyright (c) 2013-2014. The SimGrid Team.
+# Copyright (c) 2013-2020. The SimGrid Team.
 # All rights reserved.
 
 # This program is free software; you can redistribute it and/or modify it
@@ -17,7 +17,7 @@ else
     interactive=0
 fi
 
-if [ $# -lt 1 -o $# -gt 3 ]; then
+if [ $# -lt 1 ] || [ $# -gt 3 ]; then
     cat >&2 <<EOF
 Usage: $0 [-batch] archive.tar.gz [git_url [git_reference]]
 EOF
@@ -96,14 +96,14 @@ diffcmd() {
 ERROR: Some files are missing and/or unexpected in the archive.
 * lines beginning with '-' give files that are unexpected in the archive
 * lines beginning with '+' give files that are missing from the archive
-Please fix CMake files (e.g. "buildtools/Cmake/DefinePackages.cmake"),
-and/or "tools/check_dist_archive.exclude".
+Please fix CMake files (e.g. "tools/cmake/DefinePackages.cmake"),
+and/or "tools/internal/check_dist_archive.exclude".
 EOF
         diff -u "$fa" "$fb"
     fi
 }
 
-colordiff=$(type -p colordiff || true) 
+colordiff=$(type -p colordiff || true)
 colorless() {
     if [ -x "$colordiff" ]; then
         "$colordiff" | less -R -F -X