Skip to content

Instantly share code, notes, and snippets.

@trickart
Created August 12, 2016 11:06
Show Gist options
  • Save trickart/781e4bddbbbeefcd9c502407d1434d12 to your computer and use it in GitHub Desktop.
Save trickart/781e4bddbbbeefcd9c502407d1434d12 to your computer and use it in GitHub Desktop.
my script of building CyanogenMod
#!/bin/bash
START_TIME="$(date)"
source venv/bin/activate
source build/envsetup.sh
brunch $1 2>&1 | tee /tmp/tmp.log
END_TIME="$(date)"
echo -e "\n開始:${START_TIME}\n終了:${END_TIME}"
echo -e "\n開始:${START_TIME}\n終了:${END_TIME}" >> /tmp/tmp.log
cat /tmp/tmp.log | sed -r "s/\x1B\[([0-9]{1,3}((;[0-9]{1,3})*)?)?[m|K]//g" | gzip > ./build.log.gz
rm /tmp/tmp.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment