#!/bin/bash
# Copyright (c) 2013 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

readonly SCRIPT_DIR="$(dirname "$0")"
readonly SCRIPT_DIR_ABS="$(cd "${SCRIPT_DIR}" ; pwd)"

set -x
set -e
set -u

for dirname in binutils gcc gdb glibc linux-headers-for-nacl newlib ; do
  if [[ -d "$SCRIPT_DIR_ABS/SRC/$dirname" ]]; then (
    cd "$SCRIPT_DIR_ABS/SRC/$dirname"
    (git reset --hard &&
     ../../update_to_latest.sh) ||
    (cd .. &&
     rm -rf "$dirname" &&
     cd .. &&
     make pinned-src-"$dirname")
  ) fi
done

#!/bin/bash
# Copyright (c) 2013 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

readonly SCRIPT_DIR="$(dirname "$0")"
readonly SCRIPT_DIR_ABS="$(cd "${SCRIPT_DIR}" ; pwd)"

set -x
set -e
set -u

for dirname in binutils gcc gdb glibc linux-headers-for-nacl newlib ; do
  if [[ -d "$SCRIPT_DIR_ABS/SRC/$dirname" ]]; then (
    cd "$SCRIPT_DIR_ABS/SRC/$dirname"
    (git reset --hard &&
     git clean -d -f -x &&
     ../../update_to_latest.sh) ||
    (cd .. &&
     rm -rf "$dirname" &&
     cd .. &&
     make pinned-src-"$dirname")
  ) fi
done

Remove untracked files from git repos
Remove untracked files from git repos

Fixes a case where untracked file in new revision becomes
tracked file in pinned version.

R=halyavin@google.com

Review URL: https://codereview.chromium.org/26774003

git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@12269 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
