mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-01-09 14:08:03 -05:00
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com> Co-authored-by: Zhang Zhuo <mycinbrin@gmail.com> Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
22 lines
328 B
Bash
Executable File
22 lines
328 B
Bash
Executable File
#!/bin/bash
|
|
|
|
config_file="$HOME/.cargo/config"
|
|
|
|
if [ ! -e "$config_file" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
if [[ $(head -n 1 "$config_file") == "#"* ]]; then
|
|
exit 0
|
|
fi
|
|
|
|
halo2gpu_path=$(grep -Po '(?<=paths = \[")([^"]*)' $config_file)
|
|
|
|
pushd $halo2gpu_path
|
|
|
|
commit_hash=$(git log --pretty=format:%h -n 1)
|
|
echo "${commit_hash:0:7}"
|
|
|
|
popd
|
|
|