mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-24 10:02:26 +03:00
24 lines
1.0 KiB
Bash
Executable File
24 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
THIS="$0"
|
|
function log {
|
|
printf "[%s] %s\n\n" "$THIS" "$*"
|
|
}
|
|
|
|
|
|
if [ -f "target/release/gitbutler-git-askpass" ] && [ -f "target/release/gitbutler-git-setsid" ]; then
|
|
TRIPLE="$(rustc -vV | sed -n 's|host: ||p')"
|
|
log injecting gitbutler-git binaries into gitbutler-app "(TRIPLE=${TRIPLE})"
|
|
cp -v target/release/gitbutler-git-askpass "gitbutler-app/gitbutler-git-askpass-${TRIPLE}"
|
|
cp -v target/release/gitbutler-git-setsid "gitbutler-app/gitbutler-git-setsid-${TRIPLE}"
|
|
elif [ -f "target/release/gitbutler-git-askpass.exe" ] && [ -f "target/release/gitbutler-git-setsid.exe" ]; then
|
|
TRIPLE="$(rustc.exe -vV | sed -n 's|host: ||p')"
|
|
log injecting gitbutler-git binaries into gitbutler-app "(TRIPLE=${TRIPLE})"
|
|
cp -v target/release/gitbutler-git-askpass.exe "gitbutler-app/gitbutler-git-askpass-${TRIPLE}.exe"
|
|
cp -v target/release/gitbutler-git-setsid.exe "gitbutler-app/gitbutler-git-setsid-${TRIPLE}.exe"
|
|
else
|
|
log gitbutler-git binaries are not built
|
|
exit 1
|
|
fi
|