Skip to content

Commit

Permalink
install.sh: untabify
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed Mar 9, 2014
1 parent 1f7de38 commit 9523809
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions src/etc/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -240,38 +240,38 @@ need_ok "can't run these binaries on this platform"
# FIXME: Hardcoded 'rustlib' ignores CFG_RUSTLIBDIR
if [ -f "${CFG_PREFIX}/lib/rustlib/manifest" ]
then
while read p; do
msg "uninstall ${CFG_PREFIX}/$p"
rm "${CFG_PREFIX}/$p"
need_ok "failed to remove file"
done < "${CFG_PREFIX}/lib/rustlib/manifest"
while read p; do
msg "uninstall ${CFG_PREFIX}/$p"
rm "${CFG_PREFIX}/$p"
need_ok "failed to remove file"
done < "${CFG_PREFIX}/lib/rustlib/manifest"

# Remove 'rustlib' directory
msg "uninstall ${CFG_PREFIX}/lib/rustlib"
rm -r "${CFG_PREFIX}/lib/rustlib"
need_ok "failed to remove rustlib"
msg "uninstall ${CFG_PREFIX}/lib/rustlib"
rm -r "${CFG_PREFIX}/lib/rustlib"
need_ok "failed to remove rustlib"
fi

# If we're only uninstalling then exit
if [ -n "${CFG_UNINSTALL}" ]
then
exit 0
exit 0
fi

# Iterate through the new manifest and install files
while read p; do

umask 022 && mkdir -p "${CFG_PREFIX}/$(dirname $p)"
need_ok "directory creation failed"

msg "${CFG_PREFIX}/$p"
if echo "$p" | grep "/bin/" > /dev/null
then
install -m755 "${CFG_SRC_DIR}/$p" "${CFG_PREFIX}/$p"
else
install -m644 "${CFG_SRC_DIR}/$p" "${CFG_PREFIX}/$p"
fi
need_ok "file creation failed"
umask 022 && mkdir -p "${CFG_PREFIX}/$(dirname $p)"
need_ok "directory creation failed"

msg "${CFG_PREFIX}/$p"
if echo "$p" | grep "/bin/" > /dev/null
then
install -m755 "${CFG_SRC_DIR}/$p" "${CFG_PREFIX}/$p"
else
install -m644 "${CFG_SRC_DIR}/$p" "${CFG_PREFIX}/$p"
fi
need_ok "file creation failed"

# The manifest lists all files to install
done < "${CFG_SRC_DIR}/lib/rustlib/manifest"
Expand Down

5 comments on commit 9523809

@bors
Copy link
Contributor

@bors bors commented on 9523809 Mar 11, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at brson@9523809

@bors
Copy link
Contributor

@bors bors commented on 9523809 Mar 11, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging brson/rust/installer = 9523809 into auto

@bors
Copy link
Contributor

@bors bors commented on 9523809 Mar 11, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

brson/rust/installer = 9523809 merged ok, testing candidate = b63cd00

@bors
Copy link
Contributor

@bors bors commented on 9523809 Mar 11, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 9523809 Mar 11, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = b63cd00

Please sign in to comment.