Get the sha1 from sha1sum Right now we are comparing two lines that include filenames against eachother. We should only be comparing the sha1sum. Change-Id: Ibc83e7cb11e0bf3851cad51dfefd5b85d0a8d3c1
diff --git a/setup.sh b/setup.sh index 5975ff0..279ec0e 100755 --- a/setup.sh +++ b/setup.sh
@@ -22,13 +22,16 @@ # Grab the latest files from git and install them # if the setup file has changed, rerun it +sha1() { + sha1sum setup.sh | cut -d ' ' -f1 +} apt-get install -y git-core oldsetup=/tmp/pb-oldsetup.sh path=/usr/pb cp $0 $oldsetup rm -rf $path git clone https://gerrit-review.googlesource.com/plugin-builder $path -if [ "$(sha1sum $path/setup.sh)" != "$(sha1sum $oldsetup)" ] +if [ "$(sha1 $path/setup.sh)" != "$(sha1 $oldsetup)" ] then rm $oldsetup $path/setup.sh $1