Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- path="${HOME}/Pictures"
- gamelist="${path}/gamelist.json"
- function getList {
- echo "게임리스트 다운받는 중..."
- curl --silent https://api.steampowered.com/ISteamApps/GetAppList/v2/ --output ${gamelist}
- }
- function getName {
- gameName=$(jq -c -r "[ .applist .apps[] | select( .appid==$1) | .name ][0]" ${gamelist})
- }
- if [ ! -f "${gamelist}" ]; then
- getList
- fi
- for item in $(find ~/.local/share/Steam/userdata -name screenshots); do
- gameid=$(echo ${item} | cut -d '/' -f11)
- getName ${gameid}
- screenshotPath="${path}/${gameName}"
- echo "${gameName} 복사중..."
- if [ ! -d "${screenshotPath}" ]; then
- mkdir "${screenshotPath}"
- fi
- $(find ${item} -maxdepth 1 -regex '\(.*jpg\|.*png\)' -exec cp -ap {} "${screenshotPath}" \;)
- done
- echo "완료"
Add Comment
Please, Sign In to add comment