Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

google-wall/termux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

8 Commits

Repository files navigation

termux

install google-cloud-sdk

scratch=$(mktemp -d -t tmp.XXXXXXXXXX) 
cd $scratch
curl -k https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-286.0.0-linux-x86_64.tar.gz -O
tar -xzf google-cloud-sdk-286.0.0-linux-x86_64.tar.gz 
cd google-cloud-sdk
# get list of files which need shebang changed
find $(pwd) -type f -exec awk '
 /^#!.*/{print FILENAME}
 {nextfile}' {} + > ../lines.txt
# create termux-fix-shebang (if not on android)
vi ~/bin/termux-fix-shebang
"
###
###!/data/data/com.termux/files/usr/bin/sh
###PREFIX=/data/data/com.termux/files/usr
if [ $# = 0 -o "1ドル" = "-h" ]; then
 echo 'usage: termux-fix-shebang <files>'
 echo 'Rewrite shebangs in specified files for running under Termux,'
 echo 'which is done by rewriting #!*/bin/binary to #!$PREFIX/bin/binary.'
 exit 1
fi
for file in $@; do
 # Do realpath to avoid breaking symlinks (modify original file):
 sed -i -E "1 s@^#\!(.*)/bin/(.*)@#\!/data/data/com.termux/files/usr/bin/2円@" $@
done
"
chmod 755 ~/bin/termux-fix-shebang
# apply fix
xargs -0 -n 1 termux-fix-shebang < <(tr \\n \0円 < ../lines.txt)
tar -czf google-cloud-sdk-286.0.0-linux-x86_64__TERMUX.tar.gz google-cloud-sdk/

download and install

export CLOUDSDK_PYTHON=/data/data/com.termux/files/usr/bin/python2.7
curl -k https://storage.googleapis.com/gceprd-iso/google-cloud-sdk-286.0.0-linux-x86_64__TERMUX.tar.gz -O
tar -xzf google-cloud-sdk-286.0.0-linux-x86_64__TERMUX.tar.gz
cd google-cloud-sdk
bash ./install.sh
echo 'export CLOUDSDK_PYTHON="python2.7"' >> $HOME/.bashrc
echo 'export PATH="/data/data/com.termux/files/home/google-cloud-sdk/bin:$PATH"' >> $HOME/.bashrc

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%

AltStyle によって変換されたページ (->オリジナル) /