amarok-bench.sh

来自「Amarok是一款在LINUX或其他类UNIX操作系统中运行的音频播放器软件。 」· Shell 代码 · 共 73 行

SH
73
字号
#!/bin/bash# # # # # # # # # # # # # # # # # # # # # #   # # # # #   # # #   # #   # #   # #   #   ## Amarok-bench# ==================# Measures the time it takes to compile Amarok, meant to be run in a directory controlled by# Amarok-svn (also by me).## If you run it with a number as parameter (I.E. `./amarok-bench.sh 2`), that number will be# passed to unsermake's -j option, this is useful for SMP systems.# # # # # # # # # # # # # # # # # # # # # #   # # # # #   # # #   # #   # #   # #   #   #echoecho "Amarok-bench (Version 1.0)"echo "============================"echo## Define functionsfunction Error {  echo  echo -e "ERROR: $1"  exit 1 #Exit with error}function Clean {  unsermake clean > /dev/null  if [ "$?" != "0" ]; then #If the command didn't finish successfully    Error "Failed to clean the source tree!"  else    echo "Done."  fi}function Compile {  COMP_START=`date +%s`  #Run unsermake twice because of some files that gets forgotten sometimes  #(We don't want to compile as root in unsermake install, and it doesn't hurt)  unsermake -j $1 && unsermake -j $1  if [ "$?" = "0" ]; then #If the command did finish successfully    #stopwatch.    let COMP_TIME=`date +%s`-COMP_START    let COMP_M=COMP_TIME/60    let COMP_S=COMP_TIME%60    echo    echo "FINISHED! Timer stopped at $COMP_M minute(s) and $COMP_S second(s)."  else    Error "Compilation failed! Amarok was NOT compiled."  fi}JOBS=$1[ "0$JOBS" -lt "1" ] && JOBS=1echo "# Cleaning source tree"Cleanechoecho "# Compilation"echo "Ready..."sleep 1echo "Set..."sleep 1echo "COMPILE!"echoCompile $JOBSechoecho "Now get something real to do..."

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?