Update git attributes to allow install scripts to be in LF
This commit is contained in:
Родитель
8bc43210d1
Коммит
30bd7867a2
|
@ -15,4 +15,3 @@
|
|||
# Shell scripts
|
||||
*.sh eol=lf
|
||||
*.completion eol=lf
|
||||
install eol=lf
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#---------------------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Bash script to install the Azure CLI
|
||||
# Bash script to install the VSTS CLI
|
||||
#
|
||||
|
||||
INSTALL_SCRIPT_URL="https://vstscli.blob.core.windows.net/install/install.py"
|
||||
|
@ -14,10 +14,13 @@ INSTALL_SCRIPT_SHA256=264f6e73cd46052b0a0e494dbe304c0ea89926c1762cf6e80bca69be3d
|
|||
_TTY=/dev/tty
|
||||
|
||||
install_script=$(mktemp -t vsts_cli_install_tmp_XXXX) || exit
|
||||
|
||||
echo "Downloading Microsoft VSTS CLI install script from $INSTALL_SCRIPT_URL to $install_script."
|
||||
|
||||
curl -# $INSTALL_SCRIPT_URL > $install_script || exit
|
||||
|
||||
# Check validity of the script (temporarily turned off)
|
||||
|
||||
#if command -v sha256sum >/dev/null 2>&1
|
||||
#then
|
||||
# echo "$INSTALL_SCRIPT_SHA256 $install_script" | sha256sum -c - || exit
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# --------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
@ -160,8 +160,11 @@ def create_executable(exec_dir, install_dir):
|
|||
create_dir(exec_dir)
|
||||
exec_filepath = os.path.join(exec_dir, EXECUTABLE_NAME)
|
||||
|
||||
os.symlink(actual_exec_filepath, exec_filepath)
|
||||
|
||||
try:
|
||||
os.symlink(actual_exec_filepath, exec_filepath)
|
||||
except (OSError, IOError):
|
||||
pass
|
||||
|
||||
cur_stat = os.stat(exec_filepath)
|
||||
os.chmod(exec_filepath, cur_stat.st_mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
|
||||
print_status("The executable is available at '{}'.".format(exec_filepath))
|
||||
|
|
Загрузка…
Ссылка в новой задаче