Skip to content

Commit

Permalink
remove legacy typings dl
Browse files Browse the repository at this point in the history
  • Loading branch information
clearbluejar committed Jan 9, 2023
1 parent c0bfb09 commit 7c202b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
10 changes: 0 additions & 10 deletions .devcontainer/library-scripts/ghidra-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ if [ "${GHIDRA_VERSION}" == "latest" ]; then
GHIDRA_VERSION="$(echo ${GHIDRA_DOWNLOAD_URL} | cut -d_ -f 2)"
else
GHIDRA_DOWNLOAD_URL=$(curl -s https://api.github.com/repos/NationalSecurityAgency/ghidra/releases | jq -r ".[] | .assets[] | .browser_download_url" | grep "${GHIDRA_VERSION}")
PYI_DOWNLOAD_URL=$(curl -s https://api.github.com/repos/clearbluejar/ghidra-pyi-generator/releases | jq -r ".[] | .assets[] | .browser_download_url" | grep "${GHIDRA_VERSION}" | grep whl)
fi
set -e

Expand Down Expand Up @@ -96,15 +95,6 @@ chown -R ${USERNAME}:${USERNAME} ${GHIDRA_INSTALL_DIR}
# Clean up
rm -rf /tmp/ghidra-tmp

# # Download .pyi type stubs for the entire Ghidra API
# if [ $PYI_DOWNLOAD_URL ]; then
# pushd $GHIDRA_INSTALL_DIR
# wget $PYI_DOWNLOAD_URL
# popd
# else
# echo "Couldn't find matching .pyi release for Ghidra Version: ${GHIDRA_VERSION} in https://api.github.com/repos/clearbluejar/ghidra-pyi-generator/releases"
# fi

# Make GHIDRA ENV vars availble to bash and zsh shells
updaterc "$(cat << EOF
export GHIDRA_VERSION="${GHIDRA_VERSION}"
Expand Down
16 changes: 2 additions & 14 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,8 @@
python3 -m venv .env
source .env/bin/activate

# Download latest pyi typings for Ghidra Version
PYI_WHL_DOWNLOAD_URL=$(curl -s https://api.github.com/repos/clearbluejar/ghidra-pyi-generator/releases | jq -r ".[] | .assets[] | .browser_download_url" | grep "${GHIDRA_VERSION}" | grep whl | head -1)

# Ensure have valid versions
if [ -z "$PYI_WHL_DOWNLOAD_URL" ] || [ -z "$GHIDRA_VERSION" ]; then
echo "Error: Failed to get PYI_WHL_DOWNLOAD_URL:${PYI_WHL_DOWNLOAD_URL} filtering on GHIDRA_VERSION:${GHIDRA_VERSION}"
RELEASES=$(curl -s https://api.github.com/repos/clearbluejar/ghidra-pyi-generator/releases | jq -r ".[] | .assets[] | .browser_download_url")
echo "Possible releases here: ${RELEASES}"
exit 1 ## error out if they are empty
fi

echo $PYI_WHL_RELEASE_URLS
echo $PYI_WHL_DOWNLOAD_URL
pip install "${PYI_WHL_DOWNLOAD_URL}"
# Download latest pyi typings
pip install ghidra-stubs

# Install ghidra-bridge
pip install ghidra_bridge
Expand Down

0 comments on commit 7c202b8

Please sign in to comment.