This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function gbk2utf(){ | |
file="$1" | |
echo "处理文件 '$file' ..." | |
iconv -f gb2312 -t UTF-8 -c "$file" > tmp | |
mv -f tmp "$file" | |
} | |
function getdir(){ | |
for element in `ls $1` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
git_hash=kkkk | |
if [ -z $git_hash ]; | |
then | |
echo "$i 是空字符串" | |
else | |
git reset --hard ${git_hash} | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
devices_info=`adb devices` | |
echo $devices_info | |
devices_info=`echo ${devices_info} | sed 's/^List of devices attached//'` | |
devices_info=(${devices_info}) | |
device_names="" | |
for(( i=0;i<${#devices_info[@]};i++)); | |
do | |
if [ $((i%2)) == 0 ]; then | |
device_names=${device_names}" "${devices_info[i]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
devices_info=`adb devices` | |
echo $devices_info | |
devices_info=`echo ${devices_info} | sed 's/^List of devices attached//'` | |
devices_info=(${devices_info}) | |
device_names="" | |
for(( i=0;i<${#devices_info[@]};i++)); | |
do | |
if [ $((i%2)) == 0 ]; then | |
device_names=${device_names}" "${devices_info[i]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl https://api.github.com/users/zhanxiaokai/repos | grep "clone_url" | sed "s/ \"clone_url\": \"/ /g" | sed "s/\",/ /g" > clone_url.txt | |
cat clone_url.txt | while read line | |
do | |
git clone $line | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function replaceDate() { | |
formfat_date="`LC_ALL='C' TZ='Asia/Shanghai' date -u`" | |
date_long="`date +%s`" | |
echo ${formfat_date} | |
echo ${date_long} | |
sed -i "s/ro.build.date=.*/ro.build.date=$formfat_date/g" build.prop | |
sed -i "s/ro.build.date.utc=.*/ro.build.date.utc=$date_long/g" build.prop | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NDK_ROOT=$ANDROID_NDK | |
PREBUILT=$NDK_ROOT/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 | |
PLATFORM=$NDK_ROOT/platforms/android-9/arch-arm | |
export PATH=$PATH:$PREBUILT/bin:$PLATFORM/usr/include: | |
export LDFLAGS="-L$PLATFORM/usr/lib -L$PREBUILT/arm-linux-androideabi/lib -march=armv7-a" | |
export CFLAGS="-I$PLATFORM/usr/include -march=armv7-a -mfloat-abi=softfp -O2" | |
export CPPFLAGS="$CFLAGS" | |
export CFLAGS="$CFLAGS" | |
export CXXFLAGS="$CFLAGS" | |
export LDFLAGS="$LDFLAGS" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NDK_ROOT=$ANDROID_NDK | |
PREBUILT=$NDK_ROOT/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 | |
PLATFORM=$NDK_ROOT/platforms/android-9/arch-arm | |
export PATH=$PATH:$PREBUILT/bin:$PLATFORM/usr/include: | |
export LDFLAGS="-L$PLATFORM/usr/lib -L$PREBUILT/arm-linux-androideabi/lib -march=armv7-a" | |
export CFLAGS="-I$PLATFORM/usr/include -march=armv7-a -mfloat-abi=softfp -O2" | |
export CPPFLAGS="$CFLAGS" | |
export CFLAGS="$CFLAGS" | |
export CXXFLAGS="$CFLAGS" | |
export LDFLAGS="$LDFLAGS" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NDK_ROOT=$ANDROID_NDK | |
PREBUILT=$NDK_ROOT/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 | |
PLATFORM=$NDK_ROOT/platforms/android-9/arch-arm | |
export PATH=$PATH:$PREBUILT/bin:$PLATFORM/usr/include: | |
export LDFLAGS="-L$PLATFORM/usr/lib -L$PREBUILT/arm-linux-androideabi/lib -march=armv7-a" | |
export CFLAGS="-I$PLATFORM/usr/include -march=armv7-a -mfloat-abi=softfp -O2" | |
export CPPFLAGS="$CFLAGS" | |
export CFLAGS="$CFLAGS" | |
export CXXFLAGS="$CFLAGS" | |
export LDFLAGS="$LDFLAGS" |